RedisSessionHandler
extends AbstractSessionHandler
in package
Redis based session storage handler based on the Redis class provided by the PHP redis extension.
Tags
Table of Contents
- $igbinaryEmptyData : mixed
- $newSessionId : mixed
- $prefetchData : mixed
- $prefetchId : mixed
- $prefix : string
- $redis : mixed
- $sessionName : mixed
- $ttl : int
- __construct() : mixed
- List of available options: * prefix: The prefix to use for the keys in order to avoid collision on the Redis server * ttl: The time to live in seconds.
- close() : bool
- {@inheritdoc}
- destroy() : bool
- gc() : int|false
- {@inheritdoc}
- open() : bool
- read() : string
- updateTimestamp() : bool
- validateId() : bool
- write() : bool
- doDestroy() : bool
- doRead() : string
- doWrite() : bool
Properties
$igbinaryEmptyData
private
mixed
$igbinaryEmptyData
$newSessionId
private
mixed
$newSessionId
$prefetchData
private
mixed
$prefetchData
$prefetchId
private
mixed
$prefetchId
$prefix
private
string
$prefix
Key prefix for shared environments
$redis
private
mixed
$redis
$sessionName
private
mixed
$sessionName
$ttl
private
int
$ttl
Time to live in seconds
Methods
__construct()
List of available options: * prefix: The prefix to use for the keys in order to avoid collision on the Redis server * ttl: The time to live in seconds.
public
__construct(Redis|RedisArray|RedisCluster|ClientInterface|RedisProxy|RedisClusterProxy $redis[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $redis : Redis|RedisArray|RedisCluster|ClientInterface|RedisProxy|RedisClusterProxy
- $options : array<string|int, mixed> = []
Tags
Return values
mixed —close()
{@inheritdoc}
public
close() : bool
Return values
bool —destroy()
public
destroy(mixed $sessionId) : bool
Parameters
- $sessionId : mixed
Return values
bool —gc()
{@inheritdoc}
public
gc(mixed $maxlifetime) : int|false
Parameters
- $maxlifetime : mixed
Return values
int|false —open()
public
open(mixed $savePath, mixed $sessionName) : bool
Parameters
- $savePath : mixed
- $sessionName : mixed
Return values
bool —read()
public
read(mixed $sessionId) : string
Parameters
- $sessionId : mixed
Return values
string —updateTimestamp()
public
updateTimestamp(mixed $sessionId, mixed $data) : bool
Parameters
- $sessionId : mixed
- $data : mixed
Return values
bool —validateId()
public
validateId(mixed $sessionId) : bool
Parameters
- $sessionId : mixed
Return values
bool —write()
public
write(mixed $sessionId, mixed $data) : bool
Parameters
- $sessionId : mixed
- $data : mixed
Return values
bool —doDestroy()
protected
doDestroy(string $sessionId) : bool
Parameters
- $sessionId : string
Return values
bool —doRead()
protected
doRead(string $sessionId) : string
Parameters
- $sessionId : string
Return values
string —doWrite()
protected
doWrite(string $sessionId, string $data) : bool
Parameters
- $sessionId : string
- $data : string