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 66
protected string doRead(string $sessionId)

Parameters

string $sessionId

Return Value

string

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

Parameters

string $sessionId
string $data

Return Value

bool

at line 84
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 103
write($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data

in AbstractSessionHandler at line 120
destroy($sessionId)

{@inheritdoc}

Parameters

$sessionId

at line 42
__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 94
bool close()

{@inheritdoc}

Return Value

bool

at line 102
bool gc($maxlifetime)

{@inheritdoc}

Parameters

$maxlifetime

Return Value

bool

at line 110
updateTimestamp($sessionId, $data)

{@inheritdoc}

Parameters

$sessionId
$data