PHP Class Traq\Permissions

Since: 4.0.0
Author: Jack P.
Mostrar archivo Open project: nirix/traq Class Usage Examples

Protected Properties

Property Type Description
$defaults array Default permissions.
$permissions array Added permissions.

Public Methods

Method Description
add ( string $action, boolean $default = false, $category = 'misc' ) Add a permission.
getDefaults ( boolean $withCategories = false ) : array Returns default permissions.
getPermissions ( $withCategories = false ) : array Returns default and added permissions.

Method Details

add() public static method

Add a permission.
public static add ( string $action, boolean $default = false, $category = 'misc' )
$action string Permission action
$default boolean Default value

getDefaults() public static method

Returns default permissions.
public static getDefaults ( boolean $withCategories = false ) : array
$withCategories boolean
return array

getPermissions() public static method

Returns default and added permissions.
public static getPermissions ( $withCategories = false ) : array
return array

Property Details

$defaults protected_oe static_oe property

Default permissions.
protected static array $defaults
return array

$permissions protected_oe static_oe property

Added permissions.
protected static array $permissions
return array