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:

return array( 'session_containers' => array( 'SessionContainer\sample', 'my_sample_session_container', 'MySessionContainer', ), );

$container = $services->get('MySessionContainer');

package Default

 Methods

Determine if we can create a service with name

canCreateServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $services, string $name, string $requestedName) : boolean
inherited_from \Zend\ServiceManager\AbstractFactoryInterface::canCreateServiceWithName()

Parameters

$services

\Zend\ServiceManager\ServiceLocatorInterface

$name

string

$requestedName

string

Returns

boolean

Create service with name

createServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $services, string $name, string $requestedName) : \Zend\Session\Container
inherited_from \Zend\ServiceManager\AbstractFactoryInterface::createServiceWithName()

Parameters

$services

\Zend\ServiceManager\ServiceLocatorInterface

$name

string

$requestedName

string

Returns

\Zend\Session\Container

Retrieve config from service locator, and cache for later

getConfig(\Zend\ServiceManager\ServiceLocatorInterface $services) : false | array

Parameters

$services

\Zend\ServiceManager\ServiceLocatorInterface

Returns

falsearray

Retrieve the session manager instance, if any

getSessionManager(\Zend\ServiceManager\ServiceLocatorInterface $services) : null | \Zend\Session\ManagerInterface

Parameters

$services

\Zend\ServiceManager\ServiceLocatorInterface

Returns

null\Zend\Session\ManagerInterface

Normalize the container name in order to perform a lookup

normalizeContainerName(string $name) : string

Parameters

$name

string

Returns

string

 Properties

 

Cached container configuration

$config : array

Default

 

Configuration key in which session containers live

$configKey : string

Default

'session_containers'
 

$sessionManager

$sessionManager : \Zend\Session\ManagerInterface

Default