class SimpleIdentity implements IIdentity

Default implementation of IIdentity.

Properties

string|int $id
list<string> $roles
array<string,mixed> $data

Methods

__construct(string|int $id, string|array|null $roles = null, iterable|null $data = null)

No description

setId(string|int $id)

Sets the ID of user.

string|int
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 user data.

void
__set(string $key, mixed $value)

Sets user data value.

mixed
__get(string $key)

Returns user data value.

bool
__isset(string $key)

No description

array
__serialize()

No description

void
__unserialize(array $data)

No description

Details

at line 34
__construct(string|int $id, string|array|null $roles = null, iterable|null $data = null)

No description

Parameters

string|int $id
string|array|null $roles
iterable|null $data

at line 45
SimpleIdentity setId(string|int $id)

Sets the ID of user.

Parameters

string|int $id

Return Value

SimpleIdentity

at line 55
string|int getId()

Returns the ID of user.

Return Value

string|int

at line 65
SimpleIdentity setRoles(array $roles)

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

Parameters

array $roles

Return Value

SimpleIdentity

at line 76
array getRoles()

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

Return Value

array

at line 86
array getData()

Returns user data.

Return Value

array

at line 95
void __set(string $key, mixed $value)

Sets user data value.

Parameters

string $key
mixed $value

Return Value

void

at line 109
mixed __get(string $key)

Returns user data value.

Parameters

string $key

Return Value

mixed

at line 121
bool __isset(string $key)

No description

Parameters

string $key

Return Value

bool

at line 127
array __serialize()

No description

Return Value

array

at line 137
void __unserialize(array $data)

No description

Parameters

array $data

Return Value

void