Property | Type | Description | |
---|---|---|---|
$_app | string | The application we're managing shares for. | |
$_cache | array | A cache of all shares that have been retrieved, so we don't hit the backend again and again for them. | |
$_callbacks | array | modify - Called immediately before a share object's changes are saved to storage. Receives the share object as a parameter. remove - Called immediately before a share is removed from storage. Receives the share object as a parameter. list - Called immediately after a list of shares is received from storage. Passed the userid, share list, and any parameters passed to the listShare call. Should return the (possibly modified) share list. @see listShares() for more info. | |
$_groups | Horde_Group_Base | The Horde_Group driver | |
$_listcache | array | Cache used for listShares(). | |
$_logger | Horde_Log_Logger | Logger | |
$_permsObject | Horde_Perms_Base | The Horde_Perms object | |
$_root | mixed | The root of the Share tree. | |
$_shareCallback | callback | A callback that is passed to the share objects for setting the objects' Horde_Share object. | |
$_shareMap | array | Id-name-map of already cached share objects. | |
$_shareObject | string | The Horde_Share_Object subclass to instantiate objects as | |
$_sortList | array | A list of objects that we're currently sorting, for reference during the sorting algorithm. | |
$_user | string | The current user |
Method | Description | |
---|---|---|
__construct ( string $app, string $user, Horde_Perms_Base $perms, Horde_Group_Base $groups ) | Constructor. | |
addCallback ( string $type, array $callback ) | Add a callback to the collection | |
addShare ( Horde_Share_Object $share ) | Adds a share to the shares system. | |
countShares ( string $userid, integer $perm = Horde_Perms::SHOW, mixed $attributes = null ) : integer | Returns the number of shares that $userid has access to. | |
exists ( string $share ) : boolean | Checks if a share name exists in the system. | |
expireListCache ( ) | Expire the current list cache. This would be needed anytime a share is either added, deleted, had a change in owner, parent, or perms. | |
getApp ( ) : string | Returns the application we're managing shares for. | |
getListCache ( ) : array | Returns the share's list cache. | |
getPermissions ( mixed $share, string $user = null ) : mixed | Finds out what rights the given user has to this object. | |
getPermsObject ( ) : Horde_Perms_Base | Getter for Horde_Perms object | |
getShare ( string $name ) : Horde_Share_Object | Returns a Horde_Share_Object object corresponding to the given share name, with the details retrieved appropriately. | |
getShareById ( string $cid ) : Horde_Share_Object | Returns a Horde_Share_Object object corresponding to the given unique ID, with the details retrieved appropriately. | |
getShares ( array $cids ) : array | Returns an array of Horde_Share_Object objects corresponding to the given set of unique IDs, with the details retrieved appropriately. | |
idExists ( integer $id ) : boolean | Check that a share id exists in the system. | |
initShareObject ( Horde_Share_Object $object ) | (Re)connects the share object to this share driver. | |
listAllShares ( ) : array | Lists *all* shares for the current app/share, regardless of permissions. | |
listShares ( string $userid, array $params = [] ) : array | Returns an array of all shares that $userid has access to. | |
listSystemShares ( ) : array | Returns an array of all system shares. | |
newShare ( string $owner, string $share_name = '', string $name_attribute = '' ) : Horde_Share_Object | Returns a new share object. | |
removeShare ( Horde_Share_Object $share ) | Removes a share from the shares system permanently. | |
renameShare ( Horde_Share_Object $share, string $name ) | Renames a share in the shares system. | |
resetCache ( ) | Resets the internal caches. | |
runCallback ( string $type, array $params ) : mixed | Give public access to call the share callbacks. Needed to run the callbacks from the Horde_Share_Object objects. | |
setListCache ( array $cache ) | Set the list cache. | |
setLogger ( Horde_Log_Logger $logger ) | Set a logger object. | |
setShareCallback ( $callback ) | ||
setShareClass ( $classname ) | Set the class type to use for creating share objects. | |
toDriverCharset ( array $data ) | Convert TO the storage driver's charset. Individual share objects should implement this method if needed. |
Method | Description | |
---|---|---|
_addShare ( Horde_Share_Object $share ) | Adds a share to the shares system. | |
_exists ( string $share ) : boolean | Checks if a share exists in the system. | |
_getShare ( string $name ) : Horde_Share_Object | Returns a Horde_Share_Object object corresponding to the given share name, with the details retrieved appropriately. | |
_getShareById ( integer $id ) : Horde_Share_Object_sql | Returns a Horde_Share_Object object corresponding to the given unique ID, with the details retrieved appropriately. | |
_getShares ( array $ids ) : array | Returns an array of Horde_Share_Object objects corresponding to the given set of unique IDs, with the details retrieved appropriately. | |
_idExists ( integer $id ) : boolean | Check that a share id exists in the system. | |
_listAllShares ( ) : array | Lists *all* shares for the current app/share, regardless of permissions. | |
_listShares ( string $userid, array $params = [] ) : array | Returns an array of all shares that $userid has access to. | |
_newShare ( string $name ) : Horde_Share_Object | Returns a new share object. | |
_removeShare ( Horde_Share_Object $share ) | Removes a share from the shares system permanently. | |
_renameShare ( Horde_Share_Object $share, string $name ) | Renames a share in the shares system. | |
_sortShares ( $a, $b ) | Utility function to be used with uasort() for sorting arrays of Horde_Share objects. |
public __construct ( string $app, string $user, Horde_Perms_Base $perms, Horde_Group_Base $groups ) | ||
$app | string | The application that the shares belong to. |
$user | string | The current user. |
$perms | Horde_Perms_Base | The permissions object. |
$groups | Horde_Group_Base | The Horde_Group driver. |
public addCallback ( string $type, array $callback ) | ||
$type | string | |
$callback | array |
public expireListCache ( ) |
public getListCache ( ) : array | ||
return | array |
public getPermissions ( mixed $share, string $user = null ) : mixed | ||
$share | mixed | The share that should be checked for the users permissions. |
$user | string | The user to check for. |
return | mixed | A bitmask of permissions, a permission value, or an array of permission values the user has, depending on the permission type and whether the permission value is ambiguous. False if there is no such permsission. |
public getPermsObject ( ) : Horde_Perms_Base | ||
return | Horde_Perms_Base |
public setLogger ( Horde_Log_Logger $logger ) | ||
$logger | Horde_Log_Logger |
public toDriverCharset ( array $data ) | ||
$data | array | Data to be converted. |
protected string $_app | ||
return | string |
protected array $_cache | ||
return | array |
protected array $_callbacks | ||
return | array |
protected Horde_Group_Base $_groups | ||
return | Horde_Group_Base |
protected array $_listcache | ||
return | array |
protected Horde_Perms_Base $_permsObject | ||
return | Horde_Perms_Base |
protected array $_sortList | ||
return | array |