[ Index ] |
|
Code source de Horde 3.1.3 |
[Code source] [Imprimer] [Statistiques]
A bitmask of all possible permission values. Useful for removeXxxPermission(), unsetPerm(), etc.
Poids: | 407 lignes (13 kb) |
Inclus ou requis: | 1 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Perms:: (19 méthodes):
getAvailable()
getShortName()
getTitle()
getApplicationPermissions()
newPermission()
getPermission()
getPermissionById()
addPermission()
removePermission()
getPermissions()
getPermissionId()
hasPermission()
exists()
getParents()
getTree()
getPermsArray()
integerToArray()
factory()
singleton()
getAvailable($name) X-Ref |
Returns the available permissions for a given level. param: string $name The permission's name. return: array An array of available permissions and their titles or |
getShortName($name) X-Ref |
Returns the short name of an object, the last portion of the full name. param: string $name The name of the object. return: string The object's short name. |
getTitle($name) X-Ref |
Given a permission name, returns the title for that permission by looking it up in the applications's permission api. param: string $name The permissions's name. return: string The title for the permission. |
getApplicationPermissions($app) X-Ref |
Returns information about permissions implemented by an application. param: string $app An application name. return: array Hash with permissions information. |
newPermission($name) X-Ref |
Returns a new permissions object. param: string $name The permission's name. return: Permissions A new permissions object. |
getPermission($name) X-Ref |
Returns a Permission object corresponding to the named permission, with the users and other data retrieved appropriately. param: string $name The name of the permission to retrieve. |
getPermissionById($cid) X-Ref |
Returns a Permission object corresponding to the given unique ID, with the users and other data retrieved appropriately. param: integer $cid The unique ID of the permission to retrieve. |
addPermission(&$perm) X-Ref |
Adds a permission to the permissions system. The permission must first be created with Perm::newPermission(), and have any initial users added to it, before this function is called. param: Permission $perm The new perm object. |
removePermission(&$perm, $force = false) X-Ref |
Removes a permission from the permissions system permanently. param: Permission $perm The permission to remove. param: boolean $force Force to remove every child. |
getPermissions($permission, $user = null, $creator = null) X-Ref |
Finds out what rights the given user has to this object. param: mixed $permission The full permission name of the object to param: string $user The user to check for. Defaults to the current param: string $creator The user who created the event. return: mixed A bitmask of permissions the user has, false if there |
getPermissionId($permission) X-Ref |
Returns the unique identifier of this permission. param: Permission $permission The permission object to get the ID of. return: integer The unique id. |
hasPermission($permission, $user, $perm, $creator = null) X-Ref |
Finds out if the user has the specified rights to the given object. param: string $permission The permission to check. param: string $user The user to check for. param: integer $perm The permission level needed for access. param: string $creator The creator of the event return: boolean True if the user has the specified permissions. |
exists($permission) X-Ref |
Checks if a permission exists in the system. param: string $permission The permission to check. return: boolean True if the permission exists. |
getParents($child) X-Ref |
Returns a list of parent permissions. param: string $child The name of the child to retrieve parents for. return: array A hash with all parents in a tree format. |
getTree() X-Ref |
Returns all permissions of the system in a tree format. return: array A hash with all permissions in a tree format. |
getPermsArray() X-Ref |
Returns an hash of the available permissions. return: array The available permissions as a hash. |
integerToArray($int) X-Ref |
Given an integer value of permissions returns an array representation of the integer. param: integer $int The integer representation of permissions. |
factory($driver = null) X-Ref |
Attempts to return a concrete Perms instance based on $driver. param: string $driver The type of the concrete Perms subclass return: Perms|boolean The newly created concrete Perms instance, or |
singleton() X-Ref |
Attempts to return a reference to a concrete Perms instance. It will only create a new instance if no Perms instance currently exists. This method must be invoked as: $var = &Perms::singleton() return: Perms|boolean The concrete Perm reference, or false on error. |
Généré le : Sun Feb 25 18:01:28 2007 | par Balluche grâce à PHPXref 0.7 |