class Identity implements IIdentity

Default implementation of IIdentity.

Traits

Strict class for better experience.

Properties

mixed $id
array $roles
array $data

Methods

__construct($id, $roles = null, iterable $data = null)

No description

setId($id)

Sets the ID of user.

mixed
getId()

Returns the ID of user.

setRoles(array $roles)

Sets a list of roles that the user is a member of.

array
getRoles()

Returns a list of roles that the user is a member of.

array
getData()

Returns a user data.

void
__set(string $key, $value)

Sets user data value.

mixed
__get(string $key)

Returns user data value.

bool
__isset(string $key)

No description

Details

at line 40
__construct($id, $roles = null, iterable $data = null)

Parameters

$id
$roles
iterable $data

at line 52
Identity setId($id)

Sets the ID of user.

Parameters

$id

Return Value

Identity

at line 63
mixed getId()

Returns the ID of user.

Return Value

mixed

at line 73
Identity setRoles(array $roles)

Sets a list of roles that the user is a member of.

Parameters

array $roles

Return Value

Identity

at line 83
array getRoles()

Returns a list of roles that the user is a member of.

Return Value

array

at line 92
array getData()

Returns a user data.

Return Value

array

at line 101
void __set(string $key, $value)

Sets user data value.

Parameters

string $key
$value

Return Value

void

at line 116
mixed __get(string $key)

Returns user data value.

Parameters

string $key

Return Value

mixed

at line 127
bool __isset(string $key)

Parameters

string $key

Return Value

bool