PHP Class Horde_Perms_Null, horde

Copyright 2011-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Jan Schneider ([email protected])
Inheritance: extends Horde_Perms_Base
Mostra file Open project: horde/horde

Public Methods

Method Description
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.
getTree ( ) : array Returns all permissions of the system in a tree format.
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.

Method Details

addPermission() public method

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.
public addPermission ( Horde_Perms_Permission $perm )
$perm Horde_Perms_Permission The permissions object.

exists() public method

Checks if a permission exists in the system.
public exists ( string $permission ) : boolean
$permission string The permission to check.
return boolean True if the permission exists.

getParents() public method

Returns a list of parent permissions.
public getParents ( string $child ) : array
$child string The name of the child to retrieve parents for.
return array A hash with all parents in a tree format.

getPermission() public method

Returns an object corresponding to the named permission, with the users and other data retrieved appropriately.
public getPermission ( string $name ) : Horde_Perms_Permission
$name string The name of the permission to retrieve.
return Horde_Perms_Permission A permissions object.

getPermissionById() public method

Returns an object corresponding to the given unique ID, with the users and other data retrieved appropriately.
public getPermissionById ( integer $cid ) : Horde_Perms_Permission
$cid integer The unique ID of the permission to retrieve.
return Horde_Perms_Permission A permissions object.

getPermissionId() public method

Returns the unique identifier of this permission.
public getPermissionId ( Horde_Perms_Permission $permission ) : integer
$permission Horde_Perms_Permission The permission object to get the ID of.
return integer The unique id.

getTree() public method

Returns all permissions of the system in a tree format.
public getTree ( ) : array
return array A hash with all permissions in a tree format.

newPermission() public method

Returns a new permissions object.
public newPermission ( string $name, string $type = 'matrix', array $params = null ) : Horde_Perms_Permission
$name string The permission's name.
$type string The permission type.
$params array The permission parameters.
return Horde_Perms_Permission A new permissions object.

removePermission() public method

Removes a permission from the permissions system permanently.
public removePermission ( Horde_Perms_Permission $perm, boolean $force = false )
$perm Horde_Perms_Permission The permission to remove.
$force boolean Force to remove every child.