eZPublishCommunityProject  2013.9
eZ\Publish\SPI\User\Identity Interface Reference

Interface for a user identity. More...

+ Inheritance diagram for eZ\Publish\SPI\User\Identity:

Public Member Functions

 addInformation (array $information)
 Registers several pieces of information in the identity. More...
 
 getHash ()
 Returns the hash of the current identity (e.g. More...
 
 getInformation ()
 Returns registered information. More...
 
 replaceInformation (array $information)
 Replaces the information already registered in the identity. More...
 
 setInformation ($informationName, $informationValue)
 Registers an information in the identity. More...
 

Detailed Description

Interface for a user identity.

One can add any kind of information that can then be hashed and used as a fingerprint.

Typical use case is for content cache variation that you want to make vary on a bunch of user information (e.g. assigned roles). The more you add information, the more specific and fine grained your cache variation will be.

Member Function Documentation

eZ\Publish\SPI\User\Identity::addInformation ( array  $information)

Registers several pieces of information in the identity.

Parameters
array$informationHash where key is the information type and value is a scalar.

Implemented in eZ\Publish\Core\MVC\Symfony\Security\User\Identity.

eZ\Publish\SPI\User\Identity::getHash ( )

Returns the hash of the current identity (e.g.

md5, sha1...)

Returns
string

Implemented in eZ\Publish\Core\MVC\Symfony\Security\User\Identity.

eZ\Publish\SPI\User\Identity::getInformation ( )

Returns registered information.

Returns
array

Implemented in eZ\Publish\Core\MVC\Symfony\Security\User\Identity.

eZ\Publish\SPI\User\Identity::replaceInformation ( array  $information)

Replaces the information already registered in the identity.

Parameters
array$informationHash where key is the information type and value is a scalar.

Implemented in eZ\Publish\Core\MVC\Symfony\Security\User\Identity.

eZ\Publish\SPI\User\Identity::setInformation (   $informationName,
  $informationValue 
)

Registers an information in the identity.

Parameters
string$informationName
scalar$informationValue

Implemented in eZ\Publish\Core\MVC\Symfony\Security\User\Identity.


The documentation for this interface was generated from the following file: