Class Identity
Default implementation of IIdentity.
-
Nette\Object
-
Nette\FreezableObject
implements
Nette\IFreezable
-
Nette\Security\Identity
implements
Nette\Security\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
Nette\Security\Identity
|
#
setId( mixed $id )
Sets the ID of user.
Parameters
Returns
|
public
mixed
|
#
getId( )
Returns the ID of user.
Returns
mixed
Implementation of
|
public
Nette\Security\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
MemberAccessException if the property is not defined or is read-only
Overrides
|
public
mixed
&
|
#
__get( string $key )
Returns user data value.
Parameters
Returns
mixed
Throws
MemberAccessException if the property is not defined.
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
|
|