Fully Qualified Name: | Zend\Permissions\Rbac\Rbac |
Extends: | AbstractIterator |
Name | Description | Defined By |
---|---|---|
addRole() | Add a child. | Rbac |
current() |
(PHP 5 >= 5.0.0) Return the current element |
AbstractIterator |
getChildren() |
(PHP 5 >= 5.1.0) Returns an iterator for the current entry. |
AbstractIterator |
getCreateMissingRoles() | Rbac | |
getRole() | Get a child. | Rbac |
hasChildren() |
(PHP 5 >= 5.1.0) Returns if an iterator can be created fot the current entry. |
AbstractIterator |
hasRole() | Is a child with $name registered? | Rbac |
isGranted() | Determines if access is granted by checking the role and child roles for permission. | Rbac |
key() |
(PHP 5 >= 5.0.0) Return the key of the current element |
AbstractIterator |
next() |
(PHP 5 >= 5.0.0) Move forward to next element |
AbstractIterator |
rewind() |
(PHP 5 >= 5.0.0) Rewind the Iterator to the first element |
AbstractIterator |
setCreateMissingRoles() | Rbac | |
valid() |
(PHP 5 >= 5.0.0) Checks if current position is valid |
AbstractIterator |
Add a child.
Parameter Name | Type | Description |
---|---|---|
$child | string|\RoleInterface | |
$parents | array|\RoleInterface|null |
Returns: self
(PHP 5 >= 5.0.0)
Return the current element
Returns: mixed Can return any type.
(PHP 5 >= 5.1.0)
Returns an iterator for the current entry.
Returns: \RecursiveIterator An iterator for the current entry.
Returns: bool
Get a child.
Parameter Name | Type | Description |
---|---|---|
$objectOrName | \Zend\Permissions\Rbac\RoleInterface|string |
Returns: \RoleInterface
(PHP 5 >= 5.1.0)
Returns if an iterator can be created fot the current entry.
Returns: bool true if the current entry can be iterated over, otherwise returns false.
Is a child with $name registered?
Parameter Name | Type | Description |
---|---|---|
$objectOrName | \Zend\Permissions\Rbac\RoleInterface|string |
Returns: bool
Determines if access is granted by checking the role and child roles for permission.
Parameter Name | Type | Description |
---|---|---|
$role | \RoleInterface|string | |
$permission | string | |
$assert | \AssertionInterface|callable|null |
Returns: bool
(PHP 5 >= 5.0.0)
Return the key of the current element
Returns: int|null scalar on success, or null on failure.
(PHP 5 >= 5.0.0)
Move forward to next element
Returns: void Any returned value is ignored.
(PHP 5 >= 5.0.0)
Rewind the Iterator to the first element
Returns: void Any returned value is ignored.
Parameter Name | Type | Description |
---|---|---|
$createMissingRoles | bool |
Returns: \Zend\Permissions\Rbac\Rbac
(PHP 5 >= 5.0.0)
Checks if current position is valid
Returns: bool The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.