ManagerFactory
in package
implements
FactoryInterface
Factory for instantiating Session Manager
Tags
Interfaces, Classes, Traits and Enums
- FactoryInterface
Table of Contents
- __invoke() : object
- Create an object
- getHandler() : array<string|int, mixed>
- Set up the session handler by retrieving all the pieces from the service manager and injecting appropriate dependencies.
- getOptions() : array<string|int, mixed>
- Build the options array.
- registerShutdownFunction() : void
- According to the PHP manual, session_write_close should always be registered as a shutdown function when using an object as a session handler: http://us.php.net/manual/en/function.session-set-save-handler.php
Methods
__invoke()
Create an object
public
__invoke(ContainerInterface $container, string $requestedName[, null|array<string|int, mixed> $options = null ]) : object
Parameters
- $container : ContainerInterface
-
Service manager
- $requestedName : string
-
Service being created
- $options : null|array<string|int, mixed> = null
-
Extra options (optional)
Tags
Return values
object —getHandler()
Set up the session handler by retrieving all the pieces from the service manager and injecting appropriate dependencies.
protected
getHandler(ContainerInterface $container) : array<string|int, mixed>
Parameters
- $container : ContainerInterface
-
Service manager
Return values
array<string|int, mixed> —getOptions()
Build the options array.
protected
getOptions(ContainerInterface $container) : array<string|int, mixed>
Parameters
- $container : ContainerInterface
-
Service manager
Return values
array<string|int, mixed> —registerShutdownFunction()
According to the PHP manual, session_write_close should always be registered as a shutdown function when using an object as a session handler: http://us.php.net/manual/en/function.session-set-save-handler.php
protected
registerShutdownFunction(SessionManager $sessionManager) : void
This method sets that up.
Parameters
- $sessionManager : SessionManager
-
Session manager instance