\Kronolith_Shares

Share wrapper to simplify listing shares.

Summary

Methods
Properties
Constants
__construct()
__call()
listShares()
listSystemShares()
newShare()
No public properties found
No constants found
No protected methods found
$_shares
N/A
No private methods found
No private properties found
N/A

Properties

$_shares

$_shares : \Horde_Core_Share_Driver

Composed share object.

Type

\Horde_Core_Share_Driver

Methods

__construct()

__construct(\Horde_Core_Share_Driver  $shares) 

Parameters

\Horde_Core_Share_Driver $shares

__call()

__call(  $method,   $args) 

Parameters

$method
$args

listShares()

listShares(string  $userid, array  $params = array()) : array

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

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

string $userid

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

array $params

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.

Returns

array —

The shares the user has access to.

listSystemShares()

listSystemShares() : array

Returns an array of all system shares.

Throws

\Horde_Share_Exception

Returns

array —

All system shares.

newShare()

newShare(string  $owner, string  $share_name = '', string  $name_attribute = '') : \Horde_Share_Object

Returns a new 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

string $owner

The share owner name.

string $share_name

The share's name.

string $name_attribute

The name displayed to the user.

Throws

\Horde_Share_Exception

Returns

\Horde_Share_Object —

A new share object.