Handler
in package
implements
SessionHandlerInterface
Session handler class that relies on Predis\Client to store PHP's sessions data into one or multiple Redis servers.
This class is mostly intended for PHP 5.4 but it can be used under PHP 5.3
provided that a polyfill for SessionHandlerInterface
is defined by either
you or an external package such as symfony/http-foundation
.
Tags
Interfaces, Classes, Traits and Enums
- SessionHandlerInterface
Table of Contents
- $client : mixed
- $ttl : mixed
- __construct() : mixed
- close() : mixed
- {@inheritdoc}
- destroy() : mixed
- {@inheritdoc}
- gc() : mixed
- {@inheritdoc}
- getClient() : ClientInterface
- Returns the underlying client instance.
- getMaxLifeTime() : int
- Returns the session max lifetime value.
- open() : mixed
- {@inheritdoc}
- read() : mixed
- {@inheritdoc}
- register() : mixed
- Registers this instance as the current session handler.
- write() : mixed
- {@inheritdoc}
Properties
$client
protected
mixed
$client
$ttl
protected
mixed
$ttl
Methods
__construct()
public
__construct(ClientInterface $client[, array<string|int, mixed> $options = array() ]) : mixed
Parameters
- $client : ClientInterface
-
Fully initialized client instance.
- $options : array<string|int, mixed> = array()
-
Session handler options.
Return values
mixed —close()
{@inheritdoc}
public
close() : mixed
Return values
mixed —destroy()
{@inheritdoc}
public
destroy(mixed $session_id) : mixed
Parameters
- $session_id : mixed
Return values
mixed —gc()
{@inheritdoc}
public
gc(mixed $maxlifetime) : mixed
Parameters
- $maxlifetime : mixed
Return values
mixed —getClient()
Returns the underlying client instance.
public
getClient() : ClientInterface
Return values
ClientInterface —getMaxLifeTime()
Returns the session max lifetime value.
public
getMaxLifeTime() : int
Return values
int —open()
{@inheritdoc}
public
open(mixed $save_path, mixed $session_id) : mixed
Parameters
- $save_path : mixed
- $session_id : mixed
Return values
mixed —read()
{@inheritdoc}
public
read(mixed $session_id) : mixed
Parameters
- $session_id : mixed
Return values
mixed —register()
Registers this instance as the current session handler.
public
register() : mixed
Return values
mixed —write()
{@inheritdoc}
public
write(mixed $session_id, mixed $session_data) : mixed
Parameters
- $session_id : mixed
- $session_data : mixed