Interface Yiisoft\Rbac\Cycle\ItemTreeTraversal\ItemTreeTraversalInterface
An interface for retrieving hierarchical RBAC items' data in a more efficient way depending on used RDBMS and their versions.
Psalm Types
| Name | Value |
|---|---|
| Hierarchy | non-empty-list<array{type: \Yiisoft\Rbac\Item::TYPE_*, name: string, description: string|null, rule_name: string|null, created_at: integer|string, updated_at: integer|string, children: string}> |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| getChildPermissionRows() | Get all child permission rows for an item by the given name. | Yiisoft\Rbac\Cycle\ItemTreeTraversal\ItemTreeTraversalInterface |
| getChildRoleRows() | Get all child role rows for an item by the given name. | Yiisoft\Rbac\Cycle\ItemTreeTraversal\ItemTreeTraversalInterface |
| getChildrenRows() | Get all children rows for an item by the given name. | Yiisoft\Rbac\Cycle\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\Cycle\ItemTreeTraversal\ItemTreeTraversalInterface |
| getParentRows() | Get all parent rows for an item by the given name. | Yiisoft\Rbac\Cycle\ItemTreeTraversal\ItemTreeTraversalInterface |
| hasChild() | Whether a selected parent has a specific child. | Yiisoft\Rbac\Cycle\ItemTreeTraversal\ItemTreeTraversalInterface |
Method Details
Get all child permission rows for an item by the given name.
| public abstract getChildPermissionRows( string|string[] $names ): array | ||
| $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 getChildRoleRows( string|string[] $names ): array | ||
| $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 getChildrenRows( string|string[] $names ): array | ||
| $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 getHierarchy( string $name ): array | ||
| $name | string |
The child name. |
public function getHierarchy(string $name): array;
Get all parent rows for an item by the given name.
| public abstract getParentRows( string $name ): array | ||
| $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 hasChild( string $parentName, string $childName ): boolean | ||
| $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.