프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_cache | Horde_Cache | Cache object. | |
$_logger | Horde_Log_Logger | Logger. |
메소드 | 설명 | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
addPermission ( Horde_Perms_Permission $perm ) | Adds a permission to the permissions system. The permission must first be created with newPermission(), and have any initial users added to it, before this function is called. | |
exists ( string $permission ) : boolean | Checks if a permission exists in the system. | |
getParents ( string $child ) : array | Returns a list of parent permissions. | |
getPermission ( string $name ) : Horde_Perms_Permission | Returns an object corresponding to the named permission, with the users and other data retrieved appropriately. | |
getPermissionById ( integer $cid ) : Horde_Perms_Permission | Returns an object corresponding to the given unique ID, with the users and other data retrieved appropriately. | |
getPermissionId ( Horde_Perms_Permission $permission ) : integer | Returns the unique identifier of this permission. | |
getPermissions ( mixed $permission, string $user, string $creator = null ) : mixed | Finds out what rights the given user has to this object. | |
getShortName ( string $name ) : string | Returns the short name of an object, the last portion of the full name. | |
getTree ( ) : array | Returns all permissions of the system in a tree format. | |
hasPermission ( string $permission, string $user, integer $perm, string $creator = null ) : boolean | Finds out if the user has the specified rights to the given object. | |
newPermission ( string $name, string $type = 'matrix', array $params = null ) : Horde_Perms_Permission | Returns a new permissions object. | |
removePermission ( Horde_Perms_Permission $perm, boolean $force = false ) | Removes a permission from the permissions system permanently. |
public __construct ( array $params = [] ) | ||
$params | array | Configuration parameters:
'cache' - (Horde_Cache) The object to use to cache perms. 'logger' - (Horde_Log_Logger) A logger object. |
abstract public addPermission ( Horde_Perms_Permission $perm ) | ||
$perm | Horde_Perms_Permission | The permissions object. |
abstract public getParents ( string $child ) : array | ||
$child | string | The name of the child to retrieve parents for. |
리턴 | array | A hash with all parents in a tree format. |
abstract public getPermission ( string $name ) : Horde_Perms_Permission | ||
$name | string | The name of the permission to retrieve. |
리턴 | Horde_Perms_Permission | A permissions object. |
abstract public getPermissionById ( integer $cid ) : Horde_Perms_Permission | ||
$cid | integer | The unique ID of the permission to retrieve. |
리턴 | Horde_Perms_Permission | A permissions object. |
abstract public getPermissionId ( Horde_Perms_Permission $permission ) : integer | ||
$permission | Horde_Perms_Permission | The permission object to get the ID of. |
리턴 | integer | The unique id. |
public getPermissions ( mixed $permission, string $user, string $creator = null ) : mixed | ||
$permission | mixed | The full permission name of the object to check the permissions of, or the Horde_Permissions object. |
$user | string | The user to check for. |
$creator | string | The user who created the event. |
리턴 | mixed | A bitmask of permissions the user has, false if there are none. |
public getShortName ( string $name ) : string | ||
$name | string | The name of the object. |
리턴 | string | The object's short name. |
public hasPermission ( string $permission, string $user, integer $perm, string $creator = null ) : boolean | ||
$permission | string | The permission to check. |
$user | string | The user to check for. |
$perm | integer | The permission level that needs to be checked for. |
$creator | string | The creator of the event |
리턴 | boolean | Whether the user has the specified permissions. |
abstract public removePermission ( Horde_Perms_Permission $perm, boolean $force = false ) | ||
$perm | Horde_Perms_Permission | The permission to remove. |
$force | boolean | Force to remove every child. |