Méthode |
Description |
|
__construct ( array $permissions = [] ) |
Permissions constructor. |
|
add ( string $permission, integer | array $IDs ) |
Add a permission. |
|
compileAndLoad ( array $permissions ) |
Compile raw permission rows into a formatted array of granted permissions. |
|
getPermissions ( ) : array |
Grab the current permissions. |
|
has ( string $permission, integer | null $id = null ) : boolean |
Determine if the permission is present. |
|
hasAll ( array $permissions, integer | null $id = null ) : boolean |
Determine if all of the provided permissions are present. |
|
hasAny ( array $permissions, integer | null $id = null ) : boolean |
Determine if any of the provided permissions are present. |
|
isAdmin ( ) : boolean |
Determine if the admin flag is set. |
|
isBanned ( ) : boolean |
Determine if the banned flag is set. |
|
merge ( Permissions $source ) |
Merge in data from another Permissions instance. |
|
overwrite ( string $permission, boolean | array $value ) |
Set global or replace per-ID permissions. |
|
remove ( $permission, integer | array $IDs ) |
Remove a permission. |
|
set ( string $permission, boolean $value ) |
Add a global permission. |
|
setAdmin ( boolean $isAdmin ) |
Set the admin flag. |
|
setBanned ( boolean $isBanned ) |
Set the banned flag. |
|
setPermissions ( array $permissions ) |
Set the permission array. |
|