\rex_perm

Class for permissions.

Summary

Methods
Properties
Constants
register()
has()
getAll()
No public properties found
GENERAL
OPTIONS
EXTRAS
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

GENERAL

GENERAL = 'general'

OPTIONS

OPTIONS = 'options'

EXTRAS

EXTRAS = 'extras'

Methods

register()

register(string  $perm, string  $name = null, string  $group = self::GENERAL) : mixed

Registers a new permission.

Parameters

string $perm

Perm key

string $name

Perm name

string $group

Perm group, possible values are rex_perm::GENERAL, rex_perm::OPTIONS and rex_perm::EXTRAS

Returns

mixed —

has()

has(string  $perm) : bool

Returns whether the permission is registered.

Parameters

string $perm

Returns

bool —

getAll()

getAll(string  $group = self::GENERAL) : array

Returns all permissions for the given group.

Parameters

string $group

Perm group

Returns

array —

Permissions