package Default
inherited_from \Zend\Permissions\Rbac\AbstractRole

 Methods

__construct()

__construct(string $name) 

Parameters

$name

string

Add a child.

addChild(\Zend\Permissions\Rbac\RoleInterface|string $child) : \Zend\Permissions\Rbac\Role
Inherited
inherited_from \Zend\Permissions\Rbac\RoleInterface::addChild()

Parameters

$child

\Zend\Permissions\Rbac\RoleInterfacestring

Returns

\Zend\Permissions\Rbac\Role

Add permission to the role.

addPermission($name) : \Zend\Permissions\Rbac\RoleInterface
Inherited
inherited_from \Zend\Permissions\Rbac\RoleInterface::addPermission()

Parameters

$name

Returns

\Zend\Permissions\Rbac\RoleInterface

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

current() : mixed
Inherited
link http://php.net/manual/en/iterator.current.php

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.getchildren.php

Returns

\RecursiveIteratorAn iterator for the current entry.

Get the name of the role.

getName() : string
Inherited
inherited_from \Zend\Permissions\Rbac\RoleInterface::getName()

Returns

string

getParent()

getParent() : null | \Zend\Permissions\Rbac\RoleInterface
Inherited
inherited_from \Zend\Permissions\Rbac\RoleInterface::getParent()

Returns

null\Zend\Permissions\Rbac\RoleInterface

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

hasChildren() : boolean
Inherited
link http://php.net/manual/en/recursiveiterator.haschildren.php

Returns

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

Checks if a permission exists for this role or any child roles.

hasPermission(string $name) : boolean
Inherited
inherited_from \Zend\Permissions\Rbac\RoleInterface::hasPermission()

Parameters

$name

string

Returns

boolean

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

key() : integer | null
Inherited
link http://php.net/manual/en/iterator.key.php

Returns

integernullscalar on success, or null on failure.

(PHP 5 &gt;= 5.0.0)<br/> Move forward to next element

next() : void
Inherited

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

rewind() : void
Inherited

setParent()

setParent(\Zend\Permissions\Rbac\RoleInterface $parent) : \Zend\Permissions\Rbac\RoleInterface
Inherited
inherited_from \Zend\Permissions\Rbac\RoleInterface::setParent()

Parameters

$parent

\Zend\Permissions\Rbac\RoleInterface

Returns

\Zend\Permissions\Rbac\RoleInterface

(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

Returns

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

 Properties

 

$children

$children : array

Default

array()
 

$index

$index : integer

Default

0
 

$name

$name : string

Default

 

$parent

$parent : null | \Zend\Permissions\Rbac\RoleInterface

Default

 

$permissions

$permissions : array

Default

array()