Свойство | Type | Description | |
---|---|---|---|
$children | array | Role children | |
$name | string | Role name | |
$parent | Role parent | ||
$permissions | array | Role permissions |
Méthode | Description | |
---|---|---|
__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 | |
Résultat |
public __toString ( ) : string | ||
Résultat | string |
public addPermission ( string $name ) : |
||
$name | string | |
Résultat |
public hasParent ( ) : |
||
Résultat |
public hasPermission ( string $name ) : boolean | ||
$name | string | |
Résultat | boolean |
public setParent ( |
||
$parent | ||
Résultat |