Свойство | Тип | Описание | |
---|---|---|---|
$_db | Horde_Db_Adapter | Handle for the current database connection. | |
$_params | array | Configuration parameters. | |
$_permsCache | array | Cache of previously retrieved permissions. |
Метод | Описание | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
addPermission ( Horde_Perms_Permission $perm ) : integer | 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. | |
getParent ( mixed $child ) : integer | Returns a child's direct parent ID. | |
getParents ( string $child ) : array | Returns a list of parent permissions. | |
getPermission ( string $name ) : Horde_Perms_Permission_Sql | Returns an object corresponding to the named permission, with the users and other data retrieved appropriately. | |
getPermissionById ( integer $id ) : Horde_Perms_Permission_Sql | Returns a permission object corresponding to the given unique ID, with the users and other data retrieved appropriately. | |
getPermissionId ( $permission ) : integer | Returns the unique identifier of this permission. | |
getTree ( ) : array | Returns all permissions of the system in a tree format. | |
newPermission ( string $name, string $type = 'matrix', array $params = null ) : Horde_Perms_Permission_Sql | Returns a new permissions object. | |
removePermission ( Horde_Perms_Permission $perm, boolean $force = false ) : boolean | Removes a permission from the permissions system permanently. |
Метод | Описание | |
---|---|---|
_getParents ( $parents ) | TODO |
public __construct ( array $params = [] ) | ||
$params | array | Configuration parameters (in addition to base
Horde_Perms parameters):
'db' - (Horde_Db_Adapter) [REQUIRED] The DB instance. 'table' - (string) The name of the perms table. DEFAULT: 'horde_perms' |
public addPermission ( Horde_Perms_Permission $perm ) : integer | ||
$perm | Horde_Perms_Permission | The perm object. |
Результат | integer | Permission ID in the database. |
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. |
public getPermission ( string $name ) : Horde_Perms_Permission_Sql | ||
$name | string | The name of the permission to retrieve. |
Результат | Horde_Perms_Permission_Sql | TODO |
public getPermissionById ( integer $id ) : Horde_Perms_Permission_Sql | ||
$id | integer | The unique ID of the permission to retrieve. |
Результат | Horde_Perms_Permission_Sql | TODO |
public getPermissionId ( $permission ) : integer | ||
Результат | integer | The unique id. |
public removePermission ( Horde_Perms_Permission $perm, boolean $force = false ) : boolean | ||
$perm | Horde_Perms_Permission | The permission to remove. |
$force | boolean | Force to remove every child. |
Результат | boolean | True if permission was deleted. |
protected Horde_Db_Adapter $_db | ||
Результат | Horde_Db_Adapter |
protected array $_permsCache | ||
Результат | array |