Namespaces

  • Nette
    • Application
    • Caching
    • Collections
    • Config
    • Forms
    • IO
    • Loaders
    • Mail
    • Reflection
    • Security
    • Templates
    • Web
  • None
  • PHP

Classes

  • Identity
  • Permission
  • SimpleAuthenticator

Interfaces

  • IAuthenticator
  • IAuthorizator
  • IIdentity
  • IPermissionAssertion
  • IResource
  • IRole

Exceptions

  • AuthenticationException
  • Overview
  • Namespace
  • Class
  • Tree
  • Other releases

Class Identity

Default implementation of IIdentity.

Nette\Object
Extended by Nette\FreezableObject
Extended by Nette\Security\Identity implements Nette\Security\IIdentity
Namespace: Nette\Security
Author: David Grudl
SerializationVersion: 0.9.3
Located at Security/Identity.php
Methods summary
public
# __construct( string $name, mixed $roles = NULL, array $data = NULL )

Parameters

$name
string
identity name
$roles
mixed
roles
$data
array
user data
public Nette\Security\Identity
# setName( string $name )

Sets the name of user.

Sets the name of user.

Parameters

$name
string

Returns

Nette\Security\Identity
provides a fluent interface
public string
# getName( )

Returns the name of user.

Returns the name of user.

Returns

string
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

$roles
array

Returns

Nette\Security\Identity
provides a fluent interface
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

Nette\Security\IIdentity::getRoles
public array
# getData( )

Returns a user data.

Returns a user data.

Returns

array
public
# __set( string $key, mixed $value )

Sets user data 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
public mixed &
# __get( string $key )

Returns user data value.

Returns user data value.

Parameters

$key
string
property name

Returns

mixed

Throws

MemberAccessException
if the property is not defined.
public boolean
# __isset( string $key )

Is property defined?

Is property defined?

Parameters

$key
string
property name

Returns

boolean
public
# __unset( string $name )

Removes property.

Removes property.

Parameters

$name
string
property name

Throws

MemberAccessException
Methods inherited from Nette\FreezableObject
__clone(), freeze(), isFrozen(), updating()
Methods inherited from Nette\Object
__call(), __callStatic(), extensionMethod(), getReflection()
Nette Framework 0.9.7 API documentation generated by ApiGen 2.3.0