\Symfony\Component\HttpFoundation\Session\Storage\HandlerRedisSessionHandler

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

Summary

Methods
Properties
Constants
open()
validateId()
read()
write()
destroy()
__construct()
close()
gc()
updateTimestamp()
No public properties found
No constants found
doRead()
doWrite()
doDestroy()
No protected properties found
N/A
No private methods found
$sessionName
$prefetchId
$prefetchData
$newSessionId
$igbinaryEmptyData
$redis
$prefix
$ttl
N/A

Properties

$sessionName

$sessionName : 

Type

$prefetchId

$prefetchId : 

Type

$prefetchData

$prefetchData : 

Type

$newSessionId

$newSessionId : 

Type

$igbinaryEmptyData

$igbinaryEmptyData : 

Type

$redis

$redis : 

Type

$prefix

$prefix : string

Type

string — Key prefix for shared environments

$ttl

$ttl : integer

Type

integer — Time to live in seconds

Methods

open()

open(  $savePath,   $sessionName) : boolean

Parameters

$savePath
$sessionName

Returns

boolean

validateId()

validateId(  $sessionId) : boolean

Parameters

$sessionId

Returns

boolean

read()

read(  $sessionId) : string

Parameters

$sessionId

Returns

string

write()

write(  $sessionId,   $data) : boolean

Parameters

$sessionId
$data

Returns

boolean

destroy()

destroy(  $sessionId) : boolean

Parameters

$sessionId

Returns

boolean

__construct()

__construct(\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|\Symfony\Component\Cache\Traits\RedisProxy|\Symfony\Component\Cache\Traits\RedisClusterProxy  $redis, array  $options = array()) 

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.

Parameters

\Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface|\Symfony\Component\Cache\Traits\RedisProxy|\Symfony\Component\Cache\Traits\RedisClusterProxy $redis
array $options

Throws

\InvalidArgumentException

When unsupported client or options are passed

close()

close() 

{@inheritdoc}

gc()

gc(  $maxlifetime) 

{@inheritdoc}

Parameters

$maxlifetime

updateTimestamp()

updateTimestamp(  $sessionId,   $data) : boolean

Parameters

$sessionId
$data

Returns

boolean

doRead()

doRead(\Symfony\Component\HttpFoundation\Session\Storage\Handler\string  $sessionId) : string

Parameters

\Symfony\Component\HttpFoundation\Session\Storage\Handler\string $sessionId

Returns

string

doWrite()

doWrite(\Symfony\Component\HttpFoundation\Session\Storage\Handler\string  $sessionId, \Symfony\Component\HttpFoundation\Session\Storage\Handler\string  $data) : boolean

Parameters

\Symfony\Component\HttpFoundation\Session\Storage\Handler\string $sessionId
\Symfony\Component\HttpFoundation\Session\Storage\Handler\string $data

Returns

boolean

doDestroy()

doDestroy(\Symfony\Component\HttpFoundation\Session\Storage\Handler\string  $sessionId) : boolean

Parameters

\Symfony\Component\HttpFoundation\Session\Storage\Handler\string $sessionId

Returns

boolean