Final Class Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
| Inheritance | Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator |
|---|---|
| Implements | Yiisoft\Rbac\ItemsStorageInterface, Yiisoft\Rbac\Php\FileStorageInterface |
| Uses Traits | Yiisoft\Rbac\Php\ConcurrentStorageTrait |
Public Methods
Method Details
| public mixed __construct ( Yiisoft\Rbac\Php\FileStorageInterface&\Yiisoft\Rbac\ItemsStorageInterface $storage ) | ||
| $storage | Yiisoft\Rbac\Php\FileStorageInterface&\Yiisoft\Rbac\ItemsStorageInterface | |
public function __construct(private ItemsStorageInterface|FileStorageInterface $storage)
{
}
| public void add ( \Yiisoft\Rbac\Permission|\Yiisoft\Rbac\Role $item ) | ||
| $item | \Yiisoft\Rbac\Permission|\Yiisoft\Rbac\Role | |
public function add(Permission|Role $item): void
{
$this->load();
$this->storage->add($item);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public void addChild ( string $parentName, string $childName ) | ||
| $parentName | string | |
| $childName | string | |
public function addChild(string $parentName, string $childName): void
{
$this->load();
$this->storage->addChild($parentName, $childName);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public void clear ( ) |
public function clear(): void
{
$this->storage->clear();
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public void clearPermissions ( ) |
public function clearPermissions(): void
{
$this->load();
$this->storage->clearPermissions();
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public void clearRoles ( ) |
public function clearRoles(): void
{
$this->load();
$this->storage->clearRoles();
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public boolean exists ( string $name ) | ||
| $name | string | |
public function exists(string $name): bool
{
$this->load();
return $this->storage->exists($name);
}
| public \Yiisoft\Rbac\Permission|\Yiisoft\Rbac\Role|null get ( string $name ) | ||
| $name | string | |
public function get(string $name): Permission|Role|null
{
$this->load();
return $this->storage->get($name);
}
| public array getAll ( ) |
public function getAll(): array
{
$this->load();
return $this->storage->getAll();
}
| public array getAllChildPermissions ( string|array $names ) | ||
| $names | string|array | |
public function getAllChildPermissions(string|array $names): array
{
$this->load();
return $this->storage->getAllChildPermissions($names);
}
| public array getAllChildRoles ( string|array $names ) | ||
| $names | string|array | |
public function getAllChildRoles(string|array $names): array
{
$this->load();
return $this->storage->getAllChildRoles($names);
}
| public array getAllChildren ( string|array $names ) | ||
| $names | string|array | |
public function getAllChildren(string|array $names): array
{
$this->load();
return $this->storage->getAllChildren($names);
}
| public array getByNames ( array $names ) | ||
| $names | array | |
public function getByNames(array $names): array
{
$this->load();
return $this->storage->getByNames($names);
}
| public array getDirectChildren ( string $name ) | ||
| $name | string | |
public function getDirectChildren(string $name): array
{
$this->load();
return $this->storage->getDirectChildren($name);
}
| public integer getFileUpdatedAt ( ) |
public function getFileUpdatedAt(): int
{
return $this->storage->getFileUpdatedAt();
}
| public array getHierarchy ( string $name ) | ||
| $name | string | |
public function getHierarchy(string $name): array
{
$this->load();
return $this->storage->getHierarchy($name);
}
| public array getParents ( string $name ) | ||
| $name | string | |
public function getParents(string $name): array
{
$this->load();
return $this->storage->getParents($name);
}
| public \Yiisoft\Rbac\Permission|null getPermission ( string $name ) | ||
| $name | string | |
public function getPermission(string $name): ?Permission
{
$this->load();
return $this->storage->getPermission($name);
}
| public array getPermissions ( ) |
public function getPermissions(): array
{
$this->load();
return $this->storage->getPermissions();
}
| public array getPermissionsByNames ( array $names ) | ||
| $names | array | |
public function getPermissionsByNames(array $names): array
{
$this->load();
return $this->storage->getPermissionsByNames($names);
}
| public \Yiisoft\Rbac\Role|null getRole ( string $name ) | ||
| $name | string | |
public function getRole(string $name): ?Role
{
$this->load();
return $this->storage->getRole($name);
}
| public array getRoles ( ) |
public function getRoles(): array
{
$this->load();
return $this->storage->getRoles();
}
| public array getRolesByNames ( array $names ) | ||
| $names | array | |
public function getRolesByNames(array $names): array
{
$this->load();
return $this->storage->getRolesByNames($names);
}
| public boolean hasChild ( string $parentName, string $childName ) | ||
| $parentName | string | |
| $childName | string | |
public function hasChild(string $parentName, string $childName): bool
{
$this->load();
return $this->storage->hasChild($parentName, $childName);
}
| public boolean hasChildren ( string $name ) | ||
| $name | string | |
public function hasChildren(string $name): bool
{
$this->load();
return $this->storage->hasChildren($name);
}
| public boolean hasDirectChild ( string $parentName, string $childName ) | ||
| $parentName | string | |
| $childName | string | |
public function hasDirectChild(string $parentName, string $childName): bool
{
$this->load();
return $this->storage->hasDirectChild($parentName, $childName);
}
| public void remove ( string $name ) | ||
| $name | string | |
public function remove(string $name): void
{
$this->load();
$this->storage->remove($name);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public void removeChild ( string $parentName, string $childName ) | ||
| $parentName | string | |
| $childName | string | |
public function removeChild(string $parentName, string $childName): void
{
$this->load();
$this->storage->removeChild($parentName, $childName);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public void removeChildren ( string $parentName ) | ||
| $parentName | string | |
public function removeChildren(string $parentName): void
{
$this->load();
$this->storage->removeChildren($parentName);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public boolean roleExists ( string $name ) | ||
| $name | string | |
public function roleExists(string $name): bool
{
$this->load();
return $this->storage->roleExists($name);
}
| public void update ( string $name, \Yiisoft\Rbac\Permission|\Yiisoft\Rbac\Role $item ) | ||
| $name | string | |
| $item | \Yiisoft\Rbac\Permission|\Yiisoft\Rbac\Role | |
public function update(string $name, Permission|Role $item): void
{
$this->load();
$this->storage->update($name, $item);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
Signup or Login in order to comment.