0 follower

Final Class Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator

InheritanceYiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
ImplementsYiisoft\Rbac\ItemsStorageInterface, Yiisoft\Rbac\Php\FileStorageInterface
Uses TraitsYiisoft\Rbac\Php\ConcurrentStorageTrait

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
add() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
addChild() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
clear() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
clearPermissions() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
clearRoles() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
exists() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
get() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getAll() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getAllChildPermissions() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getAllChildRoles() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getAllChildren() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getByNames() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getDirectChildren() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getFileUpdatedAt() Yiisoft\Rbac\Php\ConcurrentStorageTrait
getHierarchy() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getParents() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getPermission() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getPermissions() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getPermissionsByNames() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getRole() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getRoles() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
getRolesByNames() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
hasChild() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
hasChildren() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
hasDirectChild() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
load() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
remove() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
removeChild() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
removeChildren() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
roleExists() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator
update() Yiisoft\Rbac\Php\ConcurrentItemsStorageDecorator

Method Details

Hide inherited methods

__construct() public method

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)
{
}

            
add() public method

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();
}

            
addChild() public method

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();
}

            
clear() public method

public clear( ): void

                public function clear(): void
{
    $this->storage->clear();
    $this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}

            
clearPermissions() public method

public clearPermissions( ): void

                public function clearPermissions(): void
{
    $this->load();
    $this->storage->clearPermissions();
    $this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}

            
clearRoles() public method

public clearRoles( ): void

                public function clearRoles(): void
{
    $this->load();
    $this->storage->clearRoles();
    $this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}

            
exists() public method

public exists( string $name ): boolean
$name string

                public function exists(string $name): bool
{
    $this->load();
    return $this->storage->exists($name);
}

            
get() public method

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);
}

            
getAll() public method

public getAll( ): array

                public function getAll(): array
{
    $this->load();
    return $this->storage->getAll();
}

            
getAllChildPermissions() public method

public getAllChildPermissions( string|array $names ): array
$names string|array

                public function getAllChildPermissions(string|array $names): array
{
    $this->load();
    return $this->storage->getAllChildPermissions($names);
}

            
getAllChildRoles() public method

public getAllChildRoles( string|array $names ): array
$names string|array

                public function getAllChildRoles(string|array $names): array
{
    $this->load();
    return $this->storage->getAllChildRoles($names);
}

            
getAllChildren() public method

public getAllChildren( string|array $names ): array
$names string|array

                public function getAllChildren(string|array $names): array
{
    $this->load();
    return $this->storage->getAllChildren($names);
}

            
getByNames() public method

public getByNames( array $names ): array
$names array

                public function getByNames(array $names): array
{
    $this->load();
    return $this->storage->getByNames($names);
}

            
getDirectChildren() public method

public getDirectChildren( string $name ): array
$name string

                public function getDirectChildren(string $name): array
{
    $this->load();
    return $this->storage->getDirectChildren($name);
}

            
getFileUpdatedAt() public method
public getFileUpdatedAt( ): integer

                public function getFileUpdatedAt(): int
{
    return $this->storage->getFileUpdatedAt();
}

            
getHierarchy() public method

public getHierarchy( string $name ): array
$name string

                public function getHierarchy(string $name): array
{
    $this->load();
    return $this->storage->getHierarchy($name);
}

            
getParents() public method

public getParents( string $name ): array
$name string

                public function getParents(string $name): array
{
    $this->load();
    return $this->storage->getParents($name);
}

            
getPermission() public method

public getPermission( string $name ): \Yiisoft\Rbac\Permission|null
$name string

                public function getPermission(string $name): ?Permission
{
    $this->load();
    return $this->storage->getPermission($name);
}

            
getPermissions() public method

public getPermissions( ): array

                public function getPermissions(): array
{
    $this->load();
    return $this->storage->getPermissions();
}

            
getPermissionsByNames() public method

public getPermissionsByNames( array $names ): array
$names array

                public function getPermissionsByNames(array $names): array
{
    $this->load();
    return $this->storage->getPermissionsByNames($names);
}

            
getRole() public method

public getRole( string $name ): \Yiisoft\Rbac\Role|null
$name string

                public function getRole(string $name): ?Role
{
    $this->load();
    return $this->storage->getRole($name);
}

            
getRoles() public method

public getRoles( ): array

                public function getRoles(): array
{
    $this->load();
    return $this->storage->getRoles();
}

            
getRolesByNames() public method

public getRolesByNames( array $names ): array
$names array

                public function getRolesByNames(array $names): array
{
    $this->load();
    return $this->storage->getRolesByNames($names);
}

            
hasChild() public method

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);
}

            
hasChildren() public method

public hasChildren( string $name ): boolean
$name string

                public function hasChildren(string $name): bool
{
    $this->load();
    return $this->storage->hasChildren($name);
}

            
hasDirectChild() public method

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);
}

            
load() public method

public load( ): void

                public function load(): void
{
    $this->loadInternal($this->storage);
}

            
remove() public method

public remove( string $name ): void
$name string

                public function remove(string $name): void
{
    $this->load();
    $this->storage->remove($name);
    $this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}

            
removeChild() public method

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();
}

            
removeChildren() public method

public removeChildren( string $parentName ): void
$parentName string

                public function removeChildren(string $parentName): void
{
    $this->load();
    $this->storage->removeChildren($parentName);
    $this->currentFileUpdatedAt = $this->getFileUpdatedAt();
}

            
roleExists() public method

public roleExists( string $name ): boolean
$name string

                public function roleExists(string $name): bool
{
    $this->load();
    return $this->storage->roleExists($name);
}

            
update() public method

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();
}