Zend\Session\Service\ContainerAbstractServiceFactory
Session container abstract service factory.
Allows creating Container instances, using the Zend\Service\ManagerInterface
if present. Containers are named in a "session_containers" array in the
Config service:
<code>
return array(
'session_containers' => array(
'SessionContainer\sample',
'my_sample_session_container',
'MySessionContainer',
),
);
</code>
<code>
$container = $services->get('MySessionContainer');
</code>
Synopsis
class ContainerAbstractServiceFactory
implements
AbstractFactoryInterface
{
- // members
- protected array $config;
- protected string $configKey;
- protected ManagerInterface $sessionManager;
- // methods
- public bool canCreateServiceWithName()
- public Container createServiceWithName()
- protected false|array getConfig()
- protected ManagerInterface getSessionManager()
- protected string normalizeContainerName()
Hierarchy
Implements
Members
protected
- $config
—
array
Cached container configuration - $configKey
—
string
Configuration key in which session containers live - $sessionManager — \Zend\Session\ManagerInterface
Methods
protected
- getConfig() — Retrieve config from service locator, and cache for later
- getSessionManager() — Retrieve the session manager instance, if any
- normalizeContainerName() — Normalize the container name in order to perform a lookup