| [ Index ] |
|
Code source de Horde 3.1.3 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
| Poids: | 948 lignes (31 kb) |
| Inclus ou requis: | 11 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
Horde_Share:: (20 méthodes):
singleton()
Horde_Share()
getDataTree()
getShare()
getShareById()
getShares()
newShare()
addShare()
removeShare()
hasChildren()
getParent()
getShareId()
_sortShares()
exists()
countShares()
listShares()
listAllShares()
getShareCriteria()
getPermissions()
getIdentityByShare()
DataTreeObject_Share:: (18 méthodes):
DataTreeObject_Share()
setShareOb()
getParent()
addUserPermission()
removeUserPermission()
addGroupPermission()
removeGroupPermission()
hasPermission()
removeUser()
removeGroup()
listUsers()
listGroups()
setPermission()
getPermission()
inheritPermissions()
save()
_toAttributes()
_fromAttributes()
Classe: Horde_Share - X-Ref
Horde_Share:: provides an interface to all shares a user might have. Its| singleton($app) X-Ref |
| Attempts to return a reference to a concrete Horde_Share instance. It will only create a new instance if no Horde_Share instance currently exists. This method must be invoked as: <code>$var = &Horde_Share::singleton($app);</code> param: string $app The applications that the shares relates to. return: Horde_Share The concrete Share reference, or false on an error. |
| Horde_Share($app) X-Ref |
| Constructor. param: string $app The application that the shares belong to. |
| getDataTree() X-Ref |
| Returns the DataTree instance used to manage this share. return: DataTree This share's DataTree instance. |
| getShare($name) X-Ref |
| Returns a DataTreeObject_Share object corresponding to the given share name, with the details retrieved appropriately. param: string $name The name of the share to retrieve. return: DataTreeObject_Share The requested share. |
| getShareById($cid) X-Ref |
| Returns a DataTreeObject_Share object corresponding to the given unique ID, with the details retrieved appropriately. param: string $cid The id of the share to retrieve. return: DataTreeObject_Share The requested share. |
| getShares($cids) X-Ref |
| Returns an array of DataTreeObject_Share objects corresponding to the given set of unique IDs, with the details retrieved appropriately. param: array $cids The array of ids to retrieve. return: array The requested shares. |
| newShare($name) X-Ref |
| Returns a new share object. param: string $name The share's name. return: DataTreeObject_Share A new share object. |
| addShare($share) X-Ref |
| Adds a share to the shares system. The share must first be created with Horde_Share::newShare(), and have any initial details added to it, before this function is called. param: DataTreeObject_Share $share The new share object. return: boolean|PEAR_Error PEAR_Error on failure. |
| removeShare($share) X-Ref |
| Removes a share from the shares system permanently. param: DataTreeObject_Share $share The share to remove. return: boolean|PEAR_Error PEAR_Error on failure. |
| hasChildren($share) X-Ref |
| Checks to see if a share has any child shares. param: DataTreeObject_Share $share The share to check for children. return: boolean True if the specified share has child shares. |
| getParent($child) X-Ref |
| Returns a share's direct parent object. param: string $share Get the parent of this share. return: DataTreeObject_Share The parent share, if it exists. |
| getShareId($share) X-Ref |
| Returns the ID of a share. param: DataTreeObject_Share The share to return the ID of. return: integer The share's ID or PEAR_Error on failure. |
| _sortShares($a, $b) X-Ref |
| Utility function to be used with uasort() for sorting arrays of Horde_Share objects. Example:<code> uasort($list, array('Horde_Share', '_sortShares')); </code> |
| exists($share) X-Ref |
| Checks if a share exists in the system. param: string $share The share to check. return: boolean True if the share exists, false otherwise. |
| countShares($userid, $perm = PERMS_SHOW, $attributes = null,$parent = DATATREE_ROOT, $allLevels = true) X-Ref |
| Returns the count of all shares that $userid has access to. param: string $userid The userid of the user to check access for. param: integer $perm The level of permissions required. param: mixed $attributes Restrict the shares counted to those param: string $parent The parent share to start searching at. param: boolean $allLevels Return all levels, or just the direct return: integer Number of shares the user has access to. |
| listShares($userid, $perm = PERMS_SHOW, $attributes = null,$parent = DATATREE_ROOT, $allLevels = true, $from = 0,$count = 0, $sortby_name = null, $sortby_key = null,$direction = 0) X-Ref |
| Returns an array of all shares that $userid has access to. param: string $userid The userid of the user to check access for. param: integer $perm The level of permissions required. param: mixed $attributes Restrict the shares counted to those param: string $parent The parent share to start searching at. param: boolean $allLevels Return all levels, or just the direct param: integer $from The share to start listing at. param: integer $count The number of shares to return. param: string $sortby_name Attribute name to use for sorting. param: string $sortby_key Attribute key to use for sorting. param: integer $direction Sort direction: return: array The shares the user has access to. |
| listAllShares($parent = DATATREE_ROOT) X-Ref |
| Lists *all* shares for the current app/share, regardless of permissions. This is for admin functionality and scripting tools, and shouldn't be called from user-level code! param: boolean $parent Start the listing at a certain point in the return: array All shares for the current app/share. |
| getShareCriteria($userid, $perm = PERMS_SHOW, $attributes = null) X-Ref |
| Returns an array of criteria for querying shares. param: string $userid The userid of the user to check access for. param: integer $perm The level of permissions required. param: mixed $attributes Restrict the shares returned to those who return: array The criteria tree for fetching this user's shares. |
| getPermissions($share, $user = null) X-Ref |
| TODO param: TODO param: TODO return: TODO |
| getIdentityByShare($share) X-Ref |
| Returns the Identity for a particular share owner. param: mixed $share The share to fetch the Identity for - either the return: string The preference's value. |
Classe: DataTreeObject_Share - X-Ref
Extension of the DataTreeObject class for storing Share information in the| DataTreeObject_Share($id) X-Ref |
| The DataTreeObject_Share constructor. Just makes sure to call the parent constructor so that the share's name is set properly. param: string $id The id of the share. |
| setShareOb(&$shareOb) X-Ref |
| Associates a Share object with this share. param: Horde_Share $shareOb The Share object. |
| getParent() X-Ref |
| Returns this share's parent object. return: DataTreeObject_Share The parent share, if it exists. |
| addUserPermission($userid, $permission) X-Ref |
| Gives a user a certain privilege for this share. param: string $userid The userid of the user. param: integer $permission A PERMS_* constant. |
| removeUserPermission($userid, $permission) X-Ref |
| Removes a certain privilege for a user from this share. param: string $userid The userid of the user. param: integer $permission A PERMS_* constant. |
| addGroupPermission($group, $permission) X-Ref |
| Gives a group certain privileges for this share. param: string $group The group to add permissions for. param: integer $permission A PERMS_* constant. |
| removeGroupPermission($group, $permission) X-Ref |
| Removes a certain privilege from a group. param: string $group The group to remove permissions from. param: constant $permission A PERMS_* constant. |
| hasPermission($userid, $permission, $creator = null) X-Ref |
| Checks to see if a user has a given permission. param: string $userid The userid of the user. param: integer $permission A PERMS_* constant to test for. param: string $creator The creator of the event. return: boolean Whether or not $userid has $permission. |
| removeUser($userid) X-Ref |
| Removes a user from this share. param: string $userid The userid of the user to remove. |
| removeGroup($groupId) X-Ref |
| Removes a group from this share. param: integer $groupId The group to remove. |
| listUsers($perm_level = null) X-Ref |
| Returns an array containing all the userids of the users with access to this share. param: integer $perm_level List only users with this permission level. return: array The users with access to this share. |
| listGroups($perm_level = null) X-Ref |
| Returns an array containing all the groupids of the groups with access to this share. param: integer $perm_level List only users with this permission level. return: array The IDs of the groups with access to this share. |
| setPermission(&$perm, $update = true) X-Ref |
| TODO param: TODO param: boolean $update TODO return: TODO |
| getPermission() X-Ref |
| TODO return: TODO |
| inheritPermissions() X-Ref |
| Forces all children of this share to inherit the permissions set on this share. return: TODO |
| save() X-Ref |
| Saves any changes to this object to the backend permanently. New objects are added instead. return: boolean | PEAR_Error PEAR_Error on failure. |
| _toAttributes($permsonly = false) X-Ref |
| Maps this object's attributes from the data array into a format that we can store in the attributes storage backend. param: boolean $permsonly Only process permissions? Lets subclasses return: array The attributes array. |
| _fromAttributes($attributes, $permsonly = false) X-Ref |
| Takes in a list of attributes from the backend and maps it to our internal data array. param: array $attributes The list of attributes from the backend param: boolean $permsonly Only process permissions? Lets subclasses |
| Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |