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');

 Methods

Determine if we can create a service with name

canCreateServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface $services, string $name, string $requestedName) : bool

Parameters

$name

string

$requestedName

string

Returns

bool

Create service with name

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

Parameters

$name

string

$requestedName

string

Returns

Retrieve config from service locator, and cache for later

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

Parameters

Returns

falsearray

Retrieve the session manager instance, if any

getSessionManager(\Zend\ServiceManager\ServiceLocatorInterface $services) : 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

 

Configuration key in which session containers live

$configKey : string

 

$sessionManager

$sessionManager : \Zend\Session\ManagerInterface