Class Identity
Default implementation of IIdentity.
-
Object
-
FreezableObject
implements
IFreezable
-
Identity
implements
IIdentity
Methods summary
public
|
#
__construct( mixed $id, mixed $roles = NULL, array $data = NULL )
Parameters
- $id
mixed identity ID
- $roles
mixed roles
- $data
array user data
|
public
Identity
|
#
setId( mixed $id )
Sets the ID of user.
Parameters
Returns
|
public
mixed
|
#
getId( )
Returns the ID of user.
Returns
mixed
Implementation of
|
public
Identity
|
#
setRoles( array $roles )
Sets a list of roles that the user is a member of.
Sets a list of roles that the user is a member of.
Parameters
Returns
|
public
array
|
#
getRoles( )
Returns a list of roles that the user is a member of.
Returns a list of roles that the user is a member of.
Returns
array
Implementation of
|
public
array
|
#
getData( )
Returns a user data.
Returns
array
|
public
|
#
__set( string $key, mixed $value )
Sets user data value.
Parameters
- $key
string property name
- $value
mixed property value
Throws
Overrides
|
public
mixed
&
|
#
__get( string $key )
Returns user data value.
Parameters
Returns
mixed
Throws
Overrides
|
public
boolean
|
#
__isset( string $key )
Is property defined?
Parameters
Returns
boolean
Overrides
|
public
|
#
__unset( string $name )
Removes property.
Parameters
- $name
string property name
Throws
Overrides
|
Magic properties summary
public
mixed
|
$id
|
|
public
array
|
$roles
|
|
public read-only
array
|
$data
|
|