Class NIdentity


Default implementation of IIdentity.

NObject
   |
   --NFreezableObject
      |
      --NIdentity

Implements interfaces:

Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Security/Identity.php (line 39)
Public Method Summary
NIdentity
__construct (string $name, [mixed $roles = NULL], [array $data = NULL])
array
getData ()
Returns an user data.
string
getName ()
Returns the name of user.
array
Returns a list of roles that the user is a member of.
NIdentity
setName (string $name)
Sets the name of user.
NIdentity
setRoles ($roles)
Sets a list of roles that the user is a member of.
& mixed
__get (string $key)
Returns user data value.
void
__set (string $key, mixed $value)
Sets user data value.
Methods Inherited From NFreezableObject
freeze(), isFrozen(), updating(), __clone()
Methods Inherited From NObject
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()

Method Details

line 56

__construct

public NIdentity __construct (string $name, [mixed $roles = NULL], [array $data = NULL])

Input
string $name identity name
mixed $roles roles
array $data user data
Output
NIdentity  

line 119

getData

public array getData ()

Returns an user data.

Output
array  

line 83

getName

public string getName ()

Returns the name of user.

Implementation of:

Output
string  

line 108

getRoles

public array getRoles ()

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

Implementation of:

Output
array  

line 70

setName

public NIdentity setName (string $name)

Sets the name of user.

Input
string $name
Output
NIdentity provides a fluent interface

line 95

setRoles

public NIdentity setRoles ($roles)

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

Input
$roles
Output
NIdentity provides a fluent interface

line 150

__get

public mixed & __get (string $key)

Returns user data value.

Input
string $key property name
Output
& mixed  

line 132

__set

public void __set (string $key, mixed $value)

Sets user data value.

Input
string $key property name
mixed $value property value
Output
void