Property | Type | Description | |
---|---|---|---|
$_clobFields | array | Local cache of text/clob fields | |
$_db | Horde_Db_Adapter | Handle for the current database connection. | |
$_nonClobFields | array | Local cache of non-text/clob fields | |
$_shareObject | string | The Horde_Share_Object subclass to instantiate objects as | |
$_table | string | Main share table for the current scope. |
Method | Description | |
---|---|---|
__construct ( $app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups ) | ||
countOwners ( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true ) : integer | Count the number of users who have shares with the given permissions for the current user. | |
countShares ( string $userid, integer $perm = Horde_Perms::SHOW, mixed $attributes = null, mixed $parent = null, boolean $allLevels = true ) : integer | Returns the count of all shares that $userid has access to. | |
getParent ( Horde_Share_Object $child ) : Horde_Share_Object | Returns a share's direct parent object. | |
getShareCriteria ( string $userid, integer $perm = Horde_Perms::SHOW, mixed $attributes = null, mixed $parent = null, boolean $allLevels = true ) : string | Returns an array of criteria for querying shares. | |
getStorage ( ) : Horde_Db_Adapter | ||
getTable ( ) : string | Get storage table | |
listAllShares ( ) : array | Lists *all* shares for the current app/share, regardless of permissions. | |
listOwners ( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true, integer $from, integer $count ) : array | Return a list of users who have shares with the given permissions for the current user. | |
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. | |
removeShare ( Horde_Share_Object $share ) | Removes a share from the shares system permanently. | |
setStorage ( Horde_Db_Adapter $db ) | ||
setTable ( $table ) | Set the SQL table name to use for the current scope's share storage. | |
toDriverCharset ( $data ) | Utility function to convert TO the SQL server's charset. |
Method | Description | |
---|---|---|
_addShare ( Horde_Share_Object $share ) | Adds a share to the shares system. | |
_buildPermsFromRow ( array $row ) : integer | Builds a permission bit mask from the "perm" column. | |
_convertClobs ( &$data ) | Convert clob data to string. | |
_createObject ( array $data = [] ) | ||
_exists ( string $share ) : boolean | Checks if a share exists in the system. | |
_fetchClobFields ( &$shares ) | Fetch data for all clob fields of each share passed in $shares. | |
_fromDriverCharset ( $data ) | Utility function to convert from the SQL server's charset. | |
_getClobFields ( ) : array | Return a list of fields in the table that ARE text/clob fields. | |
_getDistinctClause ( ) : string | Return a DISTINCT clause containing all non-clob field names. | |
_getNonClobFields ( ) : array | Return a list of fields in the table that are NOT text/clob fields. | |
_getShare ( string $name ) : Horde_Share_Object | Returns a Horde_Share_Object_sql object corresponding to the given share name, with the details retrieved appropriately. | |
_getShareById ( integer $id ) : Horde_Share_Object_sql | Returns a Horde_Share_Object_sql object corresponding to the given unique ID, with the details retrieved appropriately. | |
_getShareGroups ( array &$share ) | Get groups permissions | |
_getSharePerms ( &$data ) | ||
_getShareUsers ( array &$share ) | Get users permissions | |
_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. | |
_getUserAndGroupCriteria ( string $userid, integer $perm = Horde_Perms::SHOW ) : array | Returns criteria statement fragments for querying shares. | |
_hasGroups ( $share ) | Finds out if the share has user set | |
_hasUsers ( $share ) | Finds out if the share has user set | |
_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. | |
_loadPermissions ( array &$data ) | Helper function to load the permissions data into the share data | |
_newShare ( string $name ) : Horde_Share_Object | Returns a new share object. | |
_removeShare ( Horde_Share_Object $share ) : boolean | Removes a share from the shares system permanently. | |
_renameShare ( Horde_Share_Object $share, string $name ) | Renames a share in the shares system. | |
_toDriverKeys ( array $data ) : array | Convert an array keyed on client keys to an array keyed on the driver keys. |
public __construct ( $app, $user, Horde_Perms_Base $perms, Horde_Group_Base $groups ) | ||
$perms | Horde_Perms_Base | |
$groups | Horde_Group_Base |
protected _buildPermsFromRow ( array $row ) : integer | ||
$row | array | A data row including permission columns. |
return | integer | A permission mask. |
protected _fetchClobFields ( &$shares ) |
protected _fromDriverCharset ( $data ) |
protected _getClobFields ( ) : array | ||
return | array | An array of clob field names. |
protected _getDistinctClause ( ) : string | ||
return | string | The DISTINCT clause. |
protected _getNonClobFields ( ) : array | ||
return | array | An array of non-clob field names. |
protected _loadPermissions ( array &$data ) | ||
$data | array | Array of share attributes |
protected _toDriverKeys ( array $data ) : array | ||
$data | array | The client code keyed array. |
return | array | The driver keyed array. |
public countOwners ( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true ) : integer | ||
$perm | integer | The level of permissions required. |
$parent | mixed | The parent share to start looking in. (Horde_Share_Object, share_id, or null). |
$allLevels | boolean | Return all levels, or just the direct children of $parent? |
return | integer | Number of users. |
public getParent ( Horde_Share_Object $child ) : Horde_Share_Object | ||
$child | Horde_Share_Object | The share to get parent for. |
return | Horde_Share_Object | The parent share, if it exists. |
public listOwners ( integer $perm = Horde_Perms::SHOW, mixed $parent = null, boolean $allLevels = true, integer $from, integer $count ) : array | ||
$perm | integer | The level of permissions required. |
$parent | mixed | The parent share to start looking in. (Horde_Share_Object, share_id, or null) |
$allLevels | boolean | Return all levels, or just the direct children of $parent? Defaults to all levels. |
$from | integer | The user to start listing at. |
$count | integer | The number of users to return. |
return | array | List of users. |
public setTable ( $table ) |
public toDriverCharset ( $data ) |
protected array $_clobFields | ||
return | array |
protected Horde_Db_Adapter $_db | ||
return | Horde_Db_Adapter |
protected array $_nonClobFields | ||
return | array |
protected string $_table | ||
return | string |