Skip to content

Rbac

Properties

storageResource

protected \Codefy\Framework\Auth\Rbac\Resource\StorageResource $storageResource

roles

public array $roles

permissions

public array $permissions

Methods

__construct

public __construct(\Codefy\Framework\Auth\Rbac\Resource\StorageResource $storageResource): mixed

Parameters:

Parameter Type Description
$storageResource \Codefy\Framework\Auth\Rbac\Resource\StorageResource

addRole

public addRole(string $name, string $description = ''): \Codefy\Framework\Auth\Rbac\Entity\Role

Parameters:

Parameter Type Description
$name string
$description string

addPermission

public addPermission(string $name, string $description = ''): \Codefy\Framework\Auth\Rbac\Entity\Permission

Parameters:

Parameter Type Description
$name string
$description string

getRole

public getRole(string $name): \Codefy\Framework\Auth\Rbac\Entity\Role|null

Parameters:

Parameter Type Description
$name string

deleteRole

public deleteRole(string $name): void

Parameters:

Parameter Type Description
$name string

getPermission

public getPermission(string $name): \Codefy\Framework\Auth\Rbac\Entity\Permission|null

Parameters:

Parameter Type Description
$name string

deletePermission

public deletePermission(string $name): void

Parameters:

Parameter Type Description
$name string

clear

public clear(): void

load

private load(): void

save

public save(): void


Automatically generated on 2025-10-13