PermissionManager
Table of Contents
-
$permissions
: array<string|int, Permission>
-
$permSubs
: array<string|int, array<string|int, PermissibleInternal>>
-
$instance
: PermissionManager|null
-
addPermission()
: bool
-
clearPermissions()
: void
-
getInstance()
: PermissionManager
-
getPermission()
: Permission|null
-
getPermissions()
: array<string|int, Permission>
-
getPermissionSubscriptions()
: array<string|int, PermissibleInternal>
-
removePermission()
: void
-
subscribeToPermission()
: void
-
unsubscribeFromAllPermissions()
: void
-
unsubscribeFromPermission()
: void
$permissions
protected
array<string|int, Permission>
$permissions
= []
$permSubs
protected
array<string|int, array<string|int, PermissibleInternal>>
$permSubs
= []
$instance
private
static PermissionManager|null
$instance
= null
addPermission()
public
addPermission(Permission $permission) : bool
Parameters
-
$permission
: Permission
-
Return values
bool
—
clearPermissions()
public
clearPermissions() : void
Return values
void
—
getInstance()
public
static getInstance() : PermissionManager
Return values
PermissionManager
—
getPermission()
public
getPermission(string $name) : Permission|null
Parameters
-
$name
: string
-
Return values
Permission|null
—
getPermissions()
public
getPermissions() : array<string|int, Permission>
Return values
array<string|int, Permission>
—
getPermissionSubscriptions()
public
getPermissionSubscriptions(string $permission) : array<string|int, PermissibleInternal>
Parameters
-
$permission
: string
-
Return values
array<string|int, PermissibleInternal>
—
removePermission()
public
removePermission(string|Permission $permission) : void
Parameters
-
$permission
: string|Permission
-
Return values
void
—
subscribeToPermission()
public
subscribeToPermission(string $permission, PermissibleInternal $permissible) : void
Parameters
-
$permission
: string
-
-
$permissible
: PermissibleInternal
-
Return values
void
—
unsubscribeFromAllPermissions()
public
unsubscribeFromAllPermissions(PermissibleInternal $permissible) : void
Parameters
-
$permissible
: PermissibleInternal
-
Return values
void
—
unsubscribeFromPermission()
public
unsubscribeFromPermission(string $permission, PermissibleInternal $permissible) : void
Parameters
-
$permission
: string
-
-
$permissible
: PermissibleInternal
-
Return values
void
—