Метод |
Описание |
|
addResource ( $resource, $parent = NULL ) : self |
Adds a Resource having an identifier unique to the list. |
|
addRole ( $role, $parents = NULL ) : self |
Adds a Role to the list. The most recently added parent
takes precedence over parents that were previously added. |
|
allow ( $roles = self::ALL, $resources = self::ALL, $privileges = self::ALL, $assertion = NULL ) : self |
Allows one or more Roles access to [certain $privileges upon] the specified Resource(s). |
|
deny ( $roles = self::ALL, $resources = self::ALL, $privileges = self::ALL, $assertion = NULL ) : self |
Denies one or more Roles access to [certain $privileges upon] the specified Resource(s). |
|
getQueriedResource ( ) : mixed |
Returns real currently queried Resource. Use by assertion. |
|
getQueriedRole ( ) : mixed |
Returns real currently queried Role. Use by assertion. |
|
getResources ( ) : array |
Returns all Resources. |
|
getRoleParents ( $role ) : array |
Returns existing Role's parents ordered by ascending priority. |
|
getRoles ( ) : array |
Returns all Roles. |
|
hasResource ( $resource ) : boolean |
Returns TRUE if the Resource exists in the list. |
|
hasRole ( $role ) : boolean |
Returns TRUE if the Role exists in the list. |
|
isAllowed ( $role = self::ALL, $resource = self::ALL, $privilege = self::ALL ) : boolean |
Returns TRUE if and only if the Role has access to [certain $privileges upon] the Resource. |
|
removeAllResources ( ) : self |
Removes all Resources. |
|
removeAllRoles ( ) : self |
Removes all Roles from the list. |
|
removeAllow ( $roles = self::ALL, $resources = self::ALL, $privileges = self::ALL ) : self |
Removes "allow" permissions from the list in the context of the given Roles, Resources, and privileges. |
|
removeDeny ( $roles = self::ALL, $resources = self::ALL, $privileges = self::ALL ) : self |
Removes "deny" restrictions from the list in the context of the given Roles, Resources, and privileges. |
|
removeResource ( $resource ) : self |
Removes a Resource and all of its children. |
|
removeRole ( $role ) : self |
Removes the Role from the list. |
|
resourceInheritsFrom ( $resource, $inherit, $onlyParent = FALSE ) : boolean |
Returns TRUE if $resource inherits from $inherit. If $onlyParents is TRUE,
then $resource must inherit directly from $inherit. |
|
roleInheritsFrom ( $role, $inherit, $onlyParents = FALSE ) : boolean |
Returns TRUE if $role inherits from $inherit. If $onlyParents is TRUE,
then $role must inherit directly from $inherit. |
|