| Fully Qualified Name: | Zend\Permissions\Rbac\AbstractRole |
| Extends: | AbstractIterator |
| Implements: | RoleInterface |
| Name | Description | Defined By |
|---|---|---|
| addChild() | Add a child. | AbstractRole |
| addParent() | AbstractRole | |
| addPermission() | Add permission to the role. | AbstractRole |
| 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 |
| getName() | Get the name of the role. | AbstractRole |
| getParent() | AbstractRole | |
| hasChildren() |
(PHP 5 >= 5.1.0) Returns if an iterator can be created fot the current entry. |
AbstractIterator |
| hasPermission() | Checks if a permission exists for this role or any child roles. | AbstractRole |
| 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 |
| setParent() | AbstractRole | |
| valid() |
(PHP 5 >= 5.0.0) Checks if current position is valid |
AbstractIterator |
Add a child.
| Parameter Name | Type | Description |
|---|---|---|
| $child | \RoleInterface|string |
Returns: \Role
| Parameter Name | Type | Description |
|---|---|---|
| $parent | \RoleInterface |
Returns: \RoleInterface
Add permission to the role.
| Parameter Name | Type | Description |
|---|---|---|
| $name | ||
| $name |
Returns: \RoleInterface
(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.
Get the name of the role.
Returns: string
Returns: null|\RoleInterface|array
(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.
Checks if a permission exists for this role or any child roles.
| Parameter Name | Type | Description |
|---|---|---|
| $name | string |
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 |
|---|---|---|
| $parent | \RoleInterface |
Returns: \RoleInterface
(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.