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 __construct( Yiisoft\Rbac\Php\FileStorageInterface&\Yiisoft\Rbac\ItemsStorageInterface $storage ): mixed | ||
| $storage | Yiisoft\Rbac\Php\FileStorageInterface&\Yiisoft\Rbac\ItemsStorageInterface | |
public function __construct(private ItemsStorageInterface|FileStorageInterface $storage)
{
}
| public add( \Yiisoft\Rbac\Permission|\Yiisoft\Rbac\Role $item ): void | ||
| $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 addChild( string $parentName, string $childName ): void | ||
| $parentName | string | |
| $childName | string | |
public function addChild(string $parentName, string $childName): void
{
$this->load();
$this->storage->addChild($parentName, $childName);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public clear( ): void |
public function clear(): void
{
$this->storage->clear();
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public clearPermissions( ): void |
public function clearPermissions(): void
{
$this->load();
$this->storage->clearPermissions();
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public clearRoles( ): void |
public function clearRoles(): void
{
$this->load();
$this->storage->clearRoles();
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public exists( string $name ): boolean | ||
| $name | string | |
public function exists(string $name): bool
{
$this->load();
return $this->storage->exists($name);
}
| public get( string $name ): \Yiisoft\Rbac\Permission|\Yiisoft\Rbac\Role|null | ||
| $name | string | |
public function get(string $name): Permission|Role|null
{
$this->load();
return $this->storage->get($name);
}
| public getAll( ): array |
public function getAll(): array
{
$this->load();
return $this->storage->getAll();
}
| public getAllChildPermissions( string|array $names ): array | ||
| $names | string|array | |
public function getAllChildPermissions(string|array $names): array
{
$this->load();
return $this->storage->getAllChildPermissions($names);
}
| public getAllChildRoles( string|array $names ): array | ||
| $names | string|array | |
public function getAllChildRoles(string|array $names): array
{
$this->load();
return $this->storage->getAllChildRoles($names);
}
| public getAllChildren( string|array $names ): array | ||
| $names | string|array | |
public function getAllChildren(string|array $names): array
{
$this->load();
return $this->storage->getAllChildren($names);
}
| public getByNames( array $names ): array | ||
| $names | array | |
public function getByNames(array $names): array
{
$this->load();
return $this->storage->getByNames($names);
}
| public getDirectChildren( string $name ): array | ||
| $name | string | |
public function getDirectChildren(string $name): array
{
$this->load();
return $this->storage->getDirectChildren($name);
}
| public getFileUpdatedAt( ): integer |
public function getFileUpdatedAt(): int
{
return $this->storage->getFileUpdatedAt();
}
| public getHierarchy( string $name ): array | ||
| $name | string | |
public function getHierarchy(string $name): array
{
$this->load();
return $this->storage->getHierarchy($name);
}
| public getParents( string $name ): array | ||
| $name | string | |
public function getParents(string $name): array
{
$this->load();
return $this->storage->getParents($name);
}
| public getPermission( string $name ): \Yiisoft\Rbac\Permission|null | ||
| $name | string | |
public function getPermission(string $name): ?Permission
{
$this->load();
return $this->storage->getPermission($name);
}
| public getPermissions( ): array |
public function getPermissions(): array
{
$this->load();
return $this->storage->getPermissions();
}
| public getPermissionsByNames( array $names ): array | ||
| $names | array | |
public function getPermissionsByNames(array $names): array
{
$this->load();
return $this->storage->getPermissionsByNames($names);
}
| public getRole( string $name ): \Yiisoft\Rbac\Role|null | ||
| $name | string | |
public function getRole(string $name): ?Role
{
$this->load();
return $this->storage->getRole($name);
}
| public getRoles( ): array |
public function getRoles(): array
{
$this->load();
return $this->storage->getRoles();
}
| public getRolesByNames( array $names ): array | ||
| $names | array | |
public function getRolesByNames(array $names): array
{
$this->load();
return $this->storage->getRolesByNames($names);
}
| public hasChild( string $parentName, string $childName ): boolean | ||
| $parentName | string | |
| $childName | string | |
public function hasChild(string $parentName, string $childName): bool
{
$this->load();
return $this->storage->hasChild($parentName, $childName);
}
| public hasChildren( string $name ): boolean | ||
| $name | string | |
public function hasChildren(string $name): bool
{
$this->load();
return $this->storage->hasChildren($name);
}
| public hasDirectChild( string $parentName, string $childName ): boolean | ||
| $parentName | string | |
| $childName | string | |
public function hasDirectChild(string $parentName, string $childName): bool
{
$this->load();
return $this->storage->hasDirectChild($parentName, $childName);
}
| public remove( string $name ): void | ||
| $name | string | |
public function remove(string $name): void
{
$this->load();
$this->storage->remove($name);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public removeChild( string $parentName, string $childName ): void | ||
| $parentName | string | |
| $childName | string | |
public function removeChild(string $parentName, string $childName): void
{
$this->load();
$this->storage->removeChild($parentName, $childName);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public removeChildren( string $parentName ): void | ||
| $parentName | string | |
public function removeChildren(string $parentName): void
{
$this->load();
$this->storage->removeChildren($parentName);
$this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}
| public roleExists( string $name ): boolean | ||
| $name | string | |
public function roleExists(string $name): bool
{
$this->load();
return $this->storage->roleExists($name);
}
| public update( string $name, \Yiisoft\Rbac\Permission|\Yiisoft\Rbac\Role $item ): void | ||
| $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.