CommonRole extends Model
generic information about a Role
Table of Contents
- TYPE_META = 2
- META
- TYPE_META_EMPTY = 1
- META_EMPTY
- TYPE_ROLE = 0
- ROLE
- $name : string|null
- the role's name
- $type : int|null
- Token's type of role
- from() : static
- Initializing a model from an array
- getName() : string
- Getter for name
- getType() : int
- Getter for type
- jsonSerialize() : array<string|int, mixed>
- setName() : static
- Setter for name
- setType() : static
- Setter for type
Constants
TYPE_META
META
public
mixed
TYPE_META
= 2
TYPE_META_EMPTY
META_EMPTY
public
mixed
TYPE_META_EMPTY
= 1
TYPE_ROLE
ROLE
public
mixed
TYPE_ROLE
= 0
Properties
$name
the role's name
protected
string|null
$name
= null
$type
Token's type of role
protected
int|null
$type
= null
Methods
from()
Initializing a model from an array
public
static from(array<string|int, mixed> $params) : static
Parameters
- $params : array<string|int, mixed>
-
Pass this parameter if you want to initial property value from an array. See API reference for all property names and types
Tags
Return values
static —getName()
Getter for name
public
getName() : string
Return values
string —the role's name
getType()
Getter for type
public
getType() : int
Return values
int —Token's type of role
jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —setName()
Setter for name
public
setName(string $name) : static
Parameters
- $name : string
-
the role's name
Return values
static —To use in method chains
setType()
Setter for type
public
setType(int $type) : static
Parameters
- $type : int
-
Token's type of role
Return values
static —To use in method chains