Свойство | Тип | Описание | |
---|---|---|---|
$children | array | Role children | |
$name | string | Role name | |
$parent | Role parent | ||
$permissions | array | Role permissions |
Метод | Описание | |
---|---|---|
__construct ( string $name ) : |
Constructor | |
__toString ( ) : string | Method to return the string value of the name of the role | |
addChild ( mixed $role ) : |
Method to add a child role | |
addPermission ( string $name ) : |
Method to add a permission to the role | |
factory ( string $name ) : |
Static method to instantiate the role object and return itself to facilitate chaining methods together. | |
getName ( ) : string | Method to get the role name | |
getParent ( ) : |
Method to get the role parent | |
hasParent ( ) : |
Method to see if the role has a parent | |
hasPermission ( string $name ) : boolean | Method to check if a role has a permission | |
setParent ( |
Method to set the role parent |
public __construct ( string $name ) : |
||
$name | string | |
Результат |
public __toString ( ) : string | ||
Результат | string |
public addPermission ( string $name ) : |
||
$name | string | |
Результат |
public getParent ( ) : |
||
Результат |
public hasParent ( ) : |
||
Результат |
public hasPermission ( string $name ) : boolean | ||
$name | string | |
Результат | boolean |
public setParent ( |
||
$parent | ||
Результат |