trueaxiom/zf2x — pull request #3 by richardjennings (2013-11-07 09:23:25+00:00)
Title: Identity Component

## Identity Component

Designed to facilitate context based Identity instances on request.

### IdentityProviders
Identity Providers should extend Abstract Identity Provider and implement getIdentity and setIdentity methods.
Providers must be instantiated with the Identity Instance they are to manage.
Providers do not manage multiple Identity Classes.
As an example a Session Identity Provider may interact with a session container via get and set identity methods.

### Service
Identity Providers should be registered with the Identity Service via addProvider and removeProvider.
When a Provider has been registered with the Identity Service, an Instance of an IdentityInterface may be provided to getIdentity, createIdentity, updateIdentity and clearIdentity. These methods interact with at most a single Identity Provider; the provider created to manage the Identity Class if one exists. getIdentities and clearIdentities operate on every registered Identity Provider, returning all Identities and clearing all Identities respectively.