\Charcoal\User\AclPermission

A permission is a simple string, that can be read with additional data (name + category) from storage.

Summary

Methods
Properties
Constants
setCategoryType()
categoryType()
setCategory()
category()
__toString()
setIdent()
ident()
setName()
name()
No public properties found
No constants found
No protected methods found
$category
N/A
No private methods found
$categoryType
$ident
$name
N/A

Properties

$categoryType

$categoryType : string

The type of category the object can belong to.

Type

string

$ident

$ident : string

Type

string

$name

$name : \Charcoal\Translation\TranslationString

Type

\Charcoal\Translation\TranslationString

Methods

setCategoryType()

setCategoryType(string  $type) : \Charcoal\Object\CategorizableInterface

Set the type of category the object can belong to.

Parameters

string $type

The category type.

Throws

\InvalidArgumentException

If the type argument is not a string.

Returns

\Charcoal\Object\CategorizableInterface

Chainable

categoryType()

categoryType() : string

Retrieve the type of category the object can belong to.

Returns

string

setCategory()

setCategory(mixed  $category) : \Charcoal\Object\CategorizableInterface

Set the category the object belongs to.

Parameters

mixed $category

The object's category.

Returns

\Charcoal\Object\CategorizableInterface

Chainable

category()

category() : mixed

Retrieve the category the object belongs to.

Returns

mixed

__toString()

__toString() : string

Permission can be used as a string (ident).

Returns

string

setIdent()

setIdent(string  $ident) : \Charcoal\User\Acl\Permission

Parameters

string $ident

The permission identifier.

Throws

\InvalidArgumentException

If the ident is not a string.

Returns

\Charcoal\User\Acl\Permission

Chainable

ident()

ident() : string

Returns

string

setName()

setName(mixed  $name) : \Charcoal\User\Acl\Permission

Parameters

mixed $name

The permission name / label.

Returns

\Charcoal\User\Acl\Permission

Chainable

name()

name() : \Charcoal\Translation\TranslationString

Returns

\Charcoal\Translation\TranslationString