Interface Yiisoft\Rbac\Db\ItemTreeTraversal\ItemTreeTraversalInterface
An interface for retrieving hierarchical RBAC items' data in a more efficient way depending on used RDBMS and their versions.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getChildPermissionRows() | Get all child permission rows for an item by the given name. | Yiisoft\Rbac\Db\ItemTreeTraversal\ItemTreeTraversalInterface |
| getChildRoleRows() | Get all child role rows for an item by the given name. | Yiisoft\Rbac\Db\ItemTreeTraversal\ItemTreeTraversalInterface |
| getChildrenRows() | Get all children rows for an item by the given name. | Yiisoft\Rbac\Db\ItemTreeTraversal\ItemTreeTraversalInterface |
| getHierarchy() | Returns the parents tree for a single item which additionally contains children for each parent (only among the found items). The base item is included too, its children list is always empty. | Yiisoft\Rbac\Db\ItemTreeTraversal\ItemTreeTraversalInterface |
| getParentRows() | Get all parent rows for an item by the given name. | Yiisoft\Rbac\Db\ItemTreeTraversal\ItemTreeTraversalInterface |
| hasChild() | Whether a selected parent has a specific child. | Yiisoft\Rbac\Db\ItemTreeTraversal\ItemTreeTraversalInterface |
Method Details
Get all child permission rows for an item by the given name.
| public abstract array getChildPermissionRows ( string|string[] $names ) | ||
| $names | string|string[] |
Item name / names. |
| return | array |
Flat list of all child permissions. |
|---|---|---|
public function getChildPermissionRows(string|array $names): array;
Get all child role rows for an item by the given name.
| public abstract array getChildRoleRows ( string|string[] $names ) | ||
| $names | string|string[] |
Item name / names. |
| return | array |
Flat list of all child roles. |
|---|---|---|
public function getChildRoleRows(string|array $names): array;
Get all children rows for an item by the given name.
| public abstract array getChildrenRows ( string|string[] $names ) | ||
| $names | string|string[] |
Item name / names. |
| return | array |
Flat list of all children. |
|---|---|---|
public function getChildrenRows(string|array $names): array;
Returns the parents tree for a single item which additionally contains children for each parent (only among the found items). The base item is included too, its children list is always empty.
| public abstract array getHierarchy ( string $name ) | ||
| $name | string |
The child name. |
public function getHierarchy(string $name): array;
Get all parent rows for an item by the given name.
| public abstract array getParentRows ( string $name ) | ||
| $name | string |
Item name. |
| return | array |
Flat list of all parents. |
|---|---|---|
public function getParentRows(string $name): array;
Whether a selected parent has a specific child.
| public abstract boolean hasChild ( string $parentName, string $childName ) | ||
| $parentName | string |
Parent item name. |
| $childName | string |
Child item name. |
| return | boolean |
Whether a selected parent has a specific child. |
|---|---|---|
public function hasChild(string $parentName, string $childName): bool;
Signup or Login in order to comment.