access
in package
Class Access
This class is responsible for managing access permissions for different users.
Table of Contents
Properties
- $lvl : array<string|int, mixed>
- Level array.
- $tmaccess : tab_menue_access
- TM Access object.
Methods
- __construct() : mixed
- __destruct() : mixed
- access() : bool
- Access method checks if the given right is present in the check.
- accesslvl() : string
- generateaccessrow() : string
- update() : bool
Properties
$lvl
Level array.
protected
array<string|int, mixed>
$lvl
= ['1' => 'read', '2' => 'write', '4' => 'delete']
This array represents the different levels of access permissions.
$tmaccess
TM Access object.
protected
tab_menue_access
$tmaccess
This variable represents the TM Access object which is used for managing and checking access permissions for different users.
Methods
__construct()
public
__construct() : mixed
__destruct()
public
__destruct() : mixed
access()
Access method checks if the given right is present in the check.
public
access(string $right, string $check) : bool
Parameters
- $right : string
-
The right to check.
- $check : string
-
The check to compare against.
Return values
bool —Returns true if the given right is present in the check, otherwise returns false.
accesslvl()
public
accesslvl(string $mid, string $gid) : string
Parameters
- $mid : string
- $gid : string
Return values
stringgenerateaccessrow()
public
generateaccessrow( $mid) : string
Parameters
Return values
stringupdate()
public
update(string $mid, string $gid, string $lvl) : bool
Parameters
- $mid : string
- $gid : string
- $lvl : string