Methods

Add a child.

addRole(string | \Zend\Permissions\Rbac\RoleInterface $child, array | \Zend\Permissions\Rbac\RoleInterface | null $parents) : \Zend\Permissions\Rbac\self

Parameters

Exceptions

\Zend\Permissions\Rbac\Exception\InvalidArgumentException

Returns

\Zend\Permissions\Rbac\self

(PHP 5 &gt;= 5.0.0)<br/> Return the current element

current() : mixed
Inherited

link http://php.net/manual/en/iterator.current.php
inherited_from \Zend\Permissions\Rbac\AbstractIterator::current()

Returns

mixedCan return any type.

(PHP 5 &gt;= 5.1.0)<br/> Returns an iterator for the current entry.

getChildren() : \RecursiveIterator
Inherited

link http://php.net/manual/en/recursiveiterator.getRoles.php
inherited_from \Zend\Permissions\Rbac\AbstractIterator::getChildren()

Returns

\RecursiveIteratorAn iterator for the current entry.

getCreateMissingRoles()

getCreateMissingRoles() : boolean

Returns

boolean

(PHP 5 &gt;= 5.1.0)<br/> Returns if an iterator can be created fot the current entry.

hasChildren() : bool
Inherited

link http://php.net/manual/en/recursiveiterator.haschildren.php
inherited_from \Zend\Permissions\Rbac\AbstractIterator::hasChildren()

Returns

booltrue if the current entry can be iterated over, otherwise returns false.

Is a child with $name registered?

hasRole(\Zend\Permissions\Rbac\RoleInterface | string $objectOrName) : bool

Parameters

Returns

bool

Determines if access is granted by checking the role and child roles for permission.

isGranted(\Zend\Permissions\Rbac\RoleInterface | string $role, string $permission, \Zend\Permissions\Rbac\AssertionInterface | \Zend\Permissions\Rbac\Callable | null $assert) : bool

Parameters

$permission

string

$assert

\Zend\Permissions\Rbac\AssertionInterface\Zend\Permissions\Rbac\Callablenull

Returns

bool

(PHP 5 &gt;= 5.0.0)<br/> Return the key of the current element

key() : \Zend\Permissions\Rbac\scalar
Inherited

link http://php.net/manual/en/iterator.key.php
inherited_from \Zend\Permissions\Rbac\AbstractIterator::key()

Returns

\Zend\Permissions\Rbac\scalarscalar on success, or null on failure.

(PHP 5 &gt;= 5.0.0)<br/> Rewind the Iterator to the first element

rewind() : void
Inherited

link http://php.net/manual/en/iterator.rewind.php
inherited_from \Zend\Permissions\Rbac\AbstractIterator::rewind()

setCreateMissingRoles()

setCreateMissingRoles(boolean $createMissingRoles) : \Zend\Permissions\Rbac\Rbac

Parameters

$createMissingRoles

boolean

Returns

(PHP 5 &gt;= 5.0.0)<br/> Checks if current position is valid

valid() : boolean
Inherited

link http://php.net/manual/en/iterator.valid.php
inherited_from \Zend\Permissions\Rbac\AbstractIterator::valid()

Returns

booleanThe return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

 Properties

 

$children

$children 
Inherited

inherited_from \Zend\Permissions\Rbac\AbstractIterator::$$children
 

flag: whether or not to create roles automatically if they do not exist.

$createMissingRoles : bool

 

$index

$index 
Inherited

inherited_from \Zend\Permissions\Rbac\AbstractIterator::$$index