PHP Sigfox Client

Role extends CommonRole

Information about a Role

Table of Contents

TYPE_META  = 2
META
TYPE_META_EMPTY  = 1
META_EMPTY
TYPE_ROLE  = 0
ROLE
$actions  : array<string|int, mixed>|null
$id  : string|null
The role's identifier
$name  : string|null
the role's name
$path  : array<string|int, mixed>|null
The roles's path sorted by descending ancestor (direct parent to farest parent)
$perms  : array<string|int, mixed>|null
the permisions included in this role
$resources  : array<string|int, mixed>|null
$type  : int|null
Token's type of role
from()  : static
Initializing a model from an array
getActions()  : array<string|int, string>
Getter for actions
getId()  : string
Getter for id
getName()  : string
Getter for name
getPath()  : array<string|int, MinMetaRole>
Getter for path
getPerms()  : array<string|int, MinPerm>
Getter for perms
getResources()  : array<string|int, string>
Getter for resources
getType()  : int
Getter for type
jsonSerialize()  : array<string|int, mixed>
setActions()  : static
Setter for actions
setId()  : static
Setter for id
setName()  : static
Setter for name
setPath()  : static
Setter for path
setPerms()  : static
Setter for perms
setResources()  : static
Setter for resources
setType()  : static
Setter for type

Constants

TYPE_META_EMPTY

META_EMPTY

public mixed TYPE_META_EMPTY = 1

Properties

$actions

protected array<string|int, mixed>|null $actions = null

$id

The role's identifier

protected string|null $id = null

$name

the role's name

protected string|null $name = null

$path

The roles's path sorted by descending ancestor (direct parent to farest parent)

protected array<string|int, mixed>|null $path = null

$perms

the permisions included in this role

protected array<string|int, mixed>|null $perms = null

$resources

protected array<string|int, mixed>|null $resources = 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
throws
DeserializeException

If provided an invalid type to a property

Return values
static

getActions()

Getter for actions

public getActions() : array<string|int, string>
Return values
array<string|int, string>

getId()

Getter for id

public getId() : string
Return values
string

The role's identifier

getName()

Getter for name

public getName() : string
Return values
string

the role's name

getPath()

Getter for path

public getPath() : array<string|int, MinMetaRole>
Return values
array<string|int, MinMetaRole>

The roles's path sorted by descending ancestor (direct parent to farest parent)

getPerms()

Getter for perms

public getPerms() : array<string|int, MinPerm>
Return values
array<string|int, MinPerm>

the permisions included in this role

getResources()

Getter for resources

public getResources() : array<string|int, string>
Return values
array<string|int, string>

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

setActions()

Setter for actions

public setActions(array<string|int, string> $actions) : static
Parameters
$actions : array<string|int, string>
Return values
static

To use in method chains

setId()

Setter for id

public setId(string $id) : static
Parameters
$id : string

The role's identifier

Return values
static

To use in method chains

setName()

Setter for name

public setName(string $name) : static
Parameters
$name : string

the role's name

Return values
static

To use in method chains

setPath()

Setter for path

public setPath(array<string|int, MinMetaRole$path) : static
Parameters
$path : array<string|int, MinMetaRole>

The roles's path sorted by descending ancestor (direct parent to farest parent)

Return values
static

To use in method chains

setPerms()

Setter for perms

public setPerms(array<string|int, MinPerm$perms) : static
Parameters
$perms : array<string|int, MinPerm>

the permisions included in this role

Return values
static

To use in method chains

setResources()

Setter for resources

public setResources(array<string|int, string> $resources) : static
Parameters
$resources : array<string|int, string>
Return values
static

To use in method chains

Search results