Documentation

Kronolith_Shares
in package

Share wrapper to simplify listing shares.

Tags
author

Michael J Rubinsky mrubinsk@horde.org

copyright

2015-2017 Horde LLC (http://www.horde.org/)

category

Horde

license

http://www.horde.org/licenses/gpl GPL

Table of Contents

$_shares  : Horde_Core_Share_Driver
Composed share object.
__call()  : mixed
__construct()  : mixed
listShares()  : array<string|int, mixed>
Returns an array of all shares that $userid has access to.
listSystemShares()  : array<string|int, mixed>
Returns an array of all system shares.
newShare()  : Horde_Share_Object
Returns a new share object.

Properties

$_shares

Composed share object.

protected Horde_Core_Share_Driver $_shares

Methods

__call()

public __call(mixed $method, mixed $args) : mixed
Parameters
$method : mixed
$args : mixed
Return values
mixed

__construct()

public __construct(Horde_Core_Share_Driver $shares) : mixed
Parameters
$shares : Horde_Core_Share_Driver
Return values
mixed

listShares()

Returns an array of all shares that $userid has access to.

public listShares(string $userid[, array<string|int, mixed> $params = array() ]) : array<string|int, mixed>

By default returns only normal calendar shares, and not resource shares. Set $params['attributes']['calendar_type'] = Kronolith::SHARE_TYPE_RESOURCE to return resource shares.

Parameters
$userid : string

The userid of the user to check access for. An empty value for the userid will only return shares with guest access.

$params : array<string|int, mixed> = array()

Additional parameters for the search:

  • perm: Require this level of permissions. Horde_Perms constant.
  • attributes: Restrict shares to these attributes. A hash or username.
  • from: Offset. Start at this share
  • count: Limit. Only return this many.
  • sort_by: Sort by attribute.
  • direction: Sort by direction.
Return values
array<string|int, mixed>

The shares the user has access to.

listSystemShares()

Returns an array of all system shares.

public listSystemShares() : array<string|int, mixed>
Tags
throws
Horde_Share_Exception
Return values
array<string|int, mixed>

All system shares.

newShare()

Returns a new share object.

public newShare(string $owner[, string $share_name = '' ][, string $name_attribute = '' ]) : Horde_Share_Object

By default, creates a new user calendar share and not a resource share. To create a resource share, calling code must explicitly set the 'calendar_type' share attribute to Kronolith::SHARE_TYPE_RESOURCE

Parameters
$owner : string

The share owner name.

$share_name : string = ''

The share's name.

$name_attribute : string = ''

The name displayed to the user.

Tags
throws
Horde_Share_Exception
Return values
Horde_Share_Object

A new share object.

Search results