Acl/Role/Registry.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Acl
- Version
- $Id$
\Zend_Acl_Role_Registry
Package: Zend_Acl
Returns
Throws

Returns
Throws

Returns
Details
Returns

Returns
Throws

Returns
Throws

- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties
Methods

add(\Zend_Acl_Role_Interface $role, \Zend_Acl_Role_Interface | string | array $parents = null) : \Zend_Acl_Role_RegistryAdds a Role having an identifier unique to the 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.
Parameters| Name | Type | Description |
|---|---|---|
| $role | \Zend_Acl_Role_Interface | |
| $parents | \Zend_Acl_Role_Interface | string | array |
| Type | Description |
|---|---|
| \Zend_Acl_Role_Registry | Provides a fluent interface |
| Exception | Description |
|---|---|
| \Zend_Acl_Role_Registry_Exception |

get(\Zend_Acl_Role_Interface | string $role) : \Zend_Acl_Role_InterfaceReturns the identified Role
The $role parameter can either be a Role or a Role identifier.
Parameters| Name | Type | Description |
|---|---|---|
| $role | \Zend_Acl_Role_Interface | string |
| Type | Description |
|---|---|
| \Zend_Acl_Role_Interface |
| Exception | Description |
|---|---|
| \Zend_Acl_Role_Registry_Exception |

getParents(\Zend_Acl_Role_Interface | string $role) : arrayReturns an array of an existing Role's parents
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.
Parameters| Name | Type | Description |
|---|---|---|
| $role | \Zend_Acl_Role_Interface | string |
| Type | Description |
|---|---|
| array |

has(\Zend_Acl_Role_Interface | string $role) : booleanReturns true if and only if the Role exists in the registry
The $role parameter can either be a Role or a Role identifier.
Parameters| Name | Type | Description |
|---|---|---|
| $role | \Zend_Acl_Role_Interface | string |
| Type | Description |
|---|---|
| boolean |

inherits(\Zend_Acl_Role_Interface | string $role, \Zend_Acl_Role_Interface | string $inherit, boolean $onlyParents = false) : booleanReturns true if and only if $role inherits from $inherit
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.
Parameters| Name | Type | Description |
|---|---|---|
| $role | \Zend_Acl_Role_Interface | string | |
| $inherit | \Zend_Acl_Role_Interface | string | |
| $onlyParents | boolean |
| Type | Description |
|---|---|
| boolean |
| Exception | Description |
|---|---|
| \Zend_Acl_Role_Registry_Exception |

remove(\Zend_Acl_Role_Interface | string $role) : \Zend_Acl_Role_RegistryRemoves the Role from the registry
The $role parameter can either be a Role or a Role identifier.
Parameters| Name | Type | Description |
|---|---|---|
| $role | \Zend_Acl_Role_Interface | string |
| Type | Description |
|---|---|
| \Zend_Acl_Role_Registry | Provides a fluent interface |
| Exception | Description |
|---|---|
| \Zend_Acl_Role_Registry_Exception |

removeAll() : \Zend_Acl_Role_RegistryRemoves all Roles from the registry
Returns
| Type | Description |
|---|---|
| \Zend_Acl_Role_Registry | Provides a fluent interface |