Zend\Permissions\Rbac\AbstractRole
Synopsis
class AbstractRole
extends AbstractIterator
implements
RoleInterface
{
- // members
- protected null|RoleInterface $parent;
- protected string $name;
- protected array $permissions;
- // methods
- public string getName()
- public RoleInterface addPermission()
- public bool hasPermission()
- public Role addChild()
- public RoleInterface setParent()
- public null|RoleInterface getParent()
- // Inherited methods from AbstractIterator
- public mixed current()
- public void next()
- public scalar key()
- public bool valid()
- public void rewind()
- public bool hasChildren()
- public RecursiveIterator getChildren()
Hierarchy
Extends
Extended by
Implements
Members
protected
- $children
- $index
- $name — string
- $parent — Zend\Permissions\Rbac\null|RoleInterface
- $permissions — array
Methods
public
- addChild() — Add a child.
- addPermission() — Add permission to the role.
- getName() — Get the name of the role.
- getParent()
- hasPermission() — Checks if a permission exists for this role or any child roles.
- setParent()
Inherited from Zend\Permissions\Rbac\AbstractIterator
public
- current() — (PHP 5 >= 5.0.0)<br/> Return the current element
- getChildren() — (PHP 5 >= 5.1.0)<br/> Returns an iterator for the current entry.
- hasChildren() — (PHP 5 >= 5.1.0)<br/> Returns if an iterator can be created fot the current entry.
- key() — (PHP 5 >= 5.0.0)<br/> Return the key of the current element
- next() — (PHP 5 >= 5.0.0)<br/> Move forward to next element
- rewind() — (PHP 5 >= 5.0.0)<br/> Rewind the Iterator to the first element
- valid() — (PHP 5 >= 5.0.0)<br/> Checks if current position is valid