Permissions
in package
implements
PermissionsInterface
Table of Contents
Interfaces
Properties
- $permissionCode : mixed
Methods
- __construct() : mixed
- Constructs a new instance of the class with the given permissions.
- hasPermission() : bool
- Checks if the given permission is present in the permission code.
Properties
$permissionCode
private
mixed
$permissionCode
= 0
Methods
__construct()
Constructs a new instance of the class with the given permissions.
public
__construct([int $permissions = 0 ]) : mixed
Parameters
- $permissions : int = 0
-
The permissions to initialize the object with. Defaults to 0.
hasPermission()
Checks if the given permission is present in the permission code.
public
hasPermission(int $permission) : bool
Parameters
- $permission : int
-
The permission to check.
Return values
bool —Returns true if the permission is present, false otherwise.