PHP 클래스 Horde_Perms_Base, horde

Copyright 2001-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.
저자: Chuck Hagenbuch ([email protected])
저자: Jan Schneider ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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.

메소드 상세

__construct() 공개 메소드

Constructor.
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.

addPermission() 추상적인 공개 메소드

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

exists() 추상적인 공개 메소드

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

getParents() 추상적인 공개 메소드

Returns a list of parent permissions.
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.

getPermission() 추상적인 공개 메소드

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

getPermissionById() 추상적인 공개 메소드

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

getPermissionId() 추상적인 공개 메소드

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

getPermissions() 공개 메소드

Finds out what rights the given user has to this object.
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.

getShortName() 공개 메소드

Returns the short name of an object, the last portion of the full name.
public getShortName ( string $name ) : string
$name string The name of the object.
리턴 string The object's short name.

getTree() 추상적인 공개 메소드

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

hasPermission() 공개 메소드

Finds out if the user has the specified rights to the given object.
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.

newPermission() 추상적인 공개 메소드

Returns a new permissions object.
abstract 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.
리턴 Horde_Perms_Permission A new permissions object.

removePermission() 추상적인 공개 메소드

Removes a permission from the permissions system permanently.
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.

프로퍼티 상세

$_cache 보호되어 있는 프로퍼티

Cache object.
protected Horde_Cache $_cache
리턴 Horde_Cache

$_logger 보호되어 있는 프로퍼티

Logger.
protected Horde_Log_Logger $_logger
리턴 Horde_Log_Logger