Class NIdentity
Default implementation of IIdentity.
-
NObject
-
NFreezableObject
implements
IFreezable
-
NIdentity
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
NIdentity
|
#
setId( mixed $id )
Sets the ID of user.
Parameters
Returns
|
public
mixed
|
#
getId( )
Returns the ID of user.
Returns
mixed
Implementation of
|
public
NIdentity
|
#
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
|
|