Zend Framework
3.0
|
Session container abstract service factory. More...
Public Member Functions | |
canCreate (ContainerInterface $container, $requestedName) | |
Can we create an instance of the given service? (v3 usage). | |
canCreateServiceWithName (ServiceLocatorInterface $container, $name, $requestedName) | |
Can we create an instance of the given service? (v2 usage) | |
__invoke (ContainerInterface $container, $requestedName, array $options=null) | |
Create and return a named container (v3 usage). | |
createServiceWithName (ServiceLocatorInterface $container, $name, $requestedName) | |
Create and return a named container (v2 usage). | |
Protected Member Functions | |
getConfig (ContainerInterface $container) | |
Retrieve config from service locator, and cache for later. | |
getSessionManager (ContainerInterface $container) | |
Retrieve the session manager instance, if any. | |
normalizeContainerName ($name) | |
Normalize the container name in order to perform a lookup. | |
Protected Attributes | |
$config | |
$configKey = 'session_containers' | |
$sessionManager | |
Session container abstract service factory.
Allows creating Container instances, using the ManagerInterface if present. Containers are named in a "session_containers" array in the Config service:
return array( 'session_containers' => array( 'SessionContainer', 'my_sample_session_container', 'MySessionContainer', ), );
$container = $services->get('MySessionContainer');
__invoke | ( | ContainerInterface | $container, |
$requestedName, | |||
array | $options = null |
||
) |
Create and return a named container (v3 usage).
ContainerInterface | $container | |
string | $requestedName |
Implements FactoryInterface.
canCreate | ( | ContainerInterface | $container, |
$requestedName | |||
) |
Can we create an instance of the given service? (v3 usage).
ContainerInterface | $container | |
string | $requestedName |
Implements AbstractFactoryInterface.
canCreateServiceWithName | ( | ServiceLocatorInterface | $container, |
$name, | |||
$requestedName | |||
) |
Can we create an instance of the given service? (v2 usage)
ServiceLocatorInterface | $container | |
string | $name | |
string | $requestedName |
Implements AbstractFactoryInterface.
createServiceWithName | ( | ServiceLocatorInterface | $container, |
$name, | |||
$requestedName | |||
) |
Create and return a named container (v2 usage).
ContainerInterface | $container | |
string | $requestedName |
Implements AbstractFactoryInterface.
|
protected |
Retrieve config from service locator, and cache for later.
ContainerInterface | $container |
|
protected |
Retrieve the session manager instance, if any.
ContainerInterface | $container |
|
protected |
Normalize the container name in order to perform a lookup.
string | $name |
|
protected |
|
protected |
|
protected |