class RedisSessionHandler extends AbstractSessionHandler

Redis based session storage handler based on the Redis class provided by the PHP redis extension.

Methods

open($savePath, $sessionName)

{@inheritdoc}

string
doRead(string $sessionId)

No description

bool
doWrite(string $sessionId, string $data)

No description

bool
doDestroy(string $sessionId)

No description

validateId($sessionId)

{@inheritdoc}

read($sessionId)

{@inheritdoc}

write($sessionId, $data)

{@inheritdoc}

destroy($sessionId)

{@inheritdoc}

__construct(Redis|RedisArray|RedisCluster|Client|RedisProxy $redis, array $options = [])

List of available options: * prefix: The prefix to use for the keys in order to avoid collision on the Redis server.

bool
close()

{@inheritdoc}

bool
gc($maxlifetime)

{@inheritdoc}

updateTimestamp($sessionId, $data)

{@inheritdoc}

Details

open($savePath, $sessionName)

{@inheritdoc}

Parameters

$savePath
$sessionName

at line 64
protected string doRead(string $sessionId)

Parameters

string $sessionId

Return Value

string

at line 72
protected bool doWrite(string $sessionId, string $data)

Parameters

string $sessionId
string $data

Return Value

bool

at line 82
protected bool doDestroy(string $sessionId)

Parameters

string $sessionId

Return Value

bool

validateId($sessionId)

{@inheritdoc}

Parameters

$sessionId

read($sessionId)

{@inheritdoc}

Parameters

$sessionId

in AbstractSessionHandler at line 101
write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

in AbstractSessionHandler at line 118
destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId

at line 41
__construct(Redis|RedisArray|RedisCluster|Client|RedisProxy $redis, array $options = [])

List of available options: * prefix: The prefix to use for the keys in order to avoid collision on the Redis server.

Parameters

Redis|RedisArray|RedisCluster|Client|RedisProxy $redis
array $options An associative array of options

Exceptions

InvalidArgumentException When unsupported client or options are passed

at line 92
bool close()

{@inheritdoc}

Return Value

bool

at line 100
bool gc($maxlifetime)

{@inheritdoc}

Parameters

$maxlifetime

Return Value

bool

at line 108
updateTimestamp($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data