Class SessionManagerFactory

Summary

Fully Qualified Name: Zend\Session\Service\SessionManagerFactory
Implements: FactoryInterface

Description

Methods

Name Description Defined By
__invoke() Create session manager object (v3 usage). SessionManagerFactory
createService() Create a SessionManager instance (v2 usage) SessionManagerFactory

Method Details

__invoke()

Create session manager object (v3 usage).

Will consume any combination (or zero) of the following services, when present, to construct the SessionManager instance:

The first two have corresponding factories inside this namespace. The last, however, does not, due to the differences in implementations, and the fact that save handlers will often be written in userland. As such if you wish to attach a save handler to the manager, you will need to write your own factory, and assign it to the service name "Zend\Session\SaveHandler\SaveHandlerInterface", (or alias that name to your own service).

You can configure limited behaviors via the "session_manager" key of the Config service. Currently, these include:

Parameter Name Type Description
$container \ContainerInterface
$requestedName string
$options array

Returns: \SessionManager

createService()

Create a SessionManager instance (v2 usage)

Parameter Name Type Description
$services \ServiceLocatorInterface
$canonicalName null|string
$requestedName string

Returns: \SessionManager

Top