VuFind API Documentation

ManagerFactory
in package
implements FactoryInterface

Factory for instantiating Session Manager

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

codeCoverageIgnore

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
throws
ServiceNotFoundException

if unable to resolve the service.

throws
ServiceNotCreatedException

if an exception is raised when creating a service.

throws
ContainerExceptionInterface|Throwable

if any other error occurs

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

Return values
void

Search results