add()
get()
getParents()
getRoles()
has()
inherits()
remove()
removeAll()
$roles
add(\Zend\Permissions\Acl\Role\RoleInterface $role, \Zend\Permissions\Acl\Role\RoleInterface | string | array | \Traversable $parents) : \Zend\Permissions\Acl\Role\Registry
The $parents parameter may be a reference to, or the string identifier for, a Role existing in the registry, or $parents may be passed as an array of these - mixing string identifiers and objects is ok - to indicate the Roles from which the newly added Role will directly inherit.
In order to resolve potential ambiguities with conflicting rules inherited from different parents, the most recently added parent takes precedence over parents that were previously added. In other words, the first parent added will have the least priority, and the last parent added will have the highest priority.
\Zend\Permissions\Acl\Role\RoleInterfacestringarray\Traversable
\Zend\Permissions\Acl\Exception\InvalidArgumentException |
---|
\Zend\Permissions\Acl\Role\Registry
Provides a fluent interfaceget(\Zend\Permissions\Acl\Role\RoleInterface | string $role) : \Zend\Permissions\Acl\Role\RoleInterface
The $role parameter can either be a Role or a Role identifier.
\Zend\Permissions\Acl\Role\RoleInterfacestring
\Zend\Permissions\Acl\Exception\InvalidArgumentException |
---|
getParents(\Zend\Permissions\Acl\Role\RoleInterface | string $role) : array
The array keys are the identifiers of the parent Roles, and the values are the parent Role instances. The parent Roles are ordered in this array by ascending priority. The highest priority parent Role, last in the array, corresponds with the parent Role most recently added.
If the Role does not have any parents, then an empty array is returned.
\Zend\Permissions\Acl\Role\RoleInterfacestring
array
getRoles() : array
array
has(\Zend\Permissions\Acl\Role\RoleInterface | string $role) : bool
The $role parameter can either be a Role or a Role identifier.
\Zend\Permissions\Acl\Role\RoleInterfacestring
bool
inherits(\Zend\Permissions\Acl\Role\RoleInterface | string $role, \Zend\Permissions\Acl\Role\RoleInterface | string $inherit, bool $onlyParents) : bool
Both parameters may be either a Role or a Role identifier. If $onlyParents is true, then $role must inherit directly from $inherit in order to return true. By default, this method looks through the entire inheritance DAG to determine whether $role inherits from $inherit through its ancestor Roles.
\Zend\Permissions\Acl\Role\RoleInterfacestring
\Zend\Permissions\Acl\Role\RoleInterfacestring
bool
\Zend\Permissions\Acl\Exception\InvalidArgumentException |
---|
bool
remove(\Zend\Permissions\Acl\Role\RoleInterface | string $role) : \Zend\Permissions\Acl\Role\Registry
The $role parameter can either be a Role or a Role identifier.
\Zend\Permissions\Acl\Role\RoleInterfacestring
\Zend\Permissions\Acl\Exception\InvalidArgumentException |
---|
\Zend\Permissions\Acl\Role\Registry
Provides a fluent interfaceremoveAll() : \Zend\Permissions\Acl\Role\Registry
\Zend\Permissions\Acl\Role\Registry
Provides a fluent interface$roles : array