Class Identity (namespace Nette\Security)


Default implementation of IIdentity.

Object
   |
   --FreezableObject
      |
      --Identity

Implements interfaces:

Copyright: Copyright (c) 2004, 2010 David Grudl
Located: in /Security/Identity.php (line 27)
Public Method Summary
Identity
__construct (string $name, [mixed $roles = NULL], [array $data = NULL])
array
getData ()
Returns a user data.
string
getName ()
Returns the name of user.
array
Returns a list of roles that the user is a member of.
Identity
setName (string $name)
Sets the name of user.
Identity
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 FreezableObject
freeze(), isFrozen(), updating(), __clone()
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()

Method Details

line 44

__construct

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

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

line 107

getData

public array getData ()

Returns a user data.

Output
array  

line 71

getName

public string getName ()

Returns the name of user.

Implementation of:

Output
string  

line 96

getRoles

public array getRoles ()

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

Implementation of:

Output
array  

line 58

setName

public Identity setName (string $name)

Sets the name of user.

Input
string $name
Output
Identity provides a fluent interface

line 83

setRoles

public Identity setRoles ($roles)

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

Input
$roles
Output
Identity provides a fluent interface

line 138

__get

public mixed & __get (string $key)

Returns user data value.

Input
string $key property name
Output
& mixed  

line 120

__set

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

Sets user data value.

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