PHP Class Snc\RedisBundle\Session\Storage\Handler\RedisSessionHandler

Author: Justin Rainbow ([email protected])
Author: Jordi Boggiano ([email protected])
Author: Henrik Westphal ([email protected])
Inheritance: implements SessionHandlerInterface
Afficher le fichier Open project: snc/SncRedisBundle Class Usage Examples

Protected Properties

Свойство Type Description
$locked Indicates an active session lock
$locking Indicates an sessions should be locked
$prefix string
$redis Predis\Client | Redis
$ttl integer

Méthodes publiques

Méthode Description
__construct ( Client | Redis $redis, array $options = [], string $prefix = 'session', $locking = true, $spinLockWait = 150000 ) Redis session storage constructor.
__destruct ( ) Destructor.
close ( )
destroy ( $sessionId )
gc ( $lifetime )
open ( $savePath, $sessionName )
read ( $sessionId )
setTtl ( integer $ttl ) Change the default TTL.
write ( $sessionId, $data )

Méthodes protégées

Méthode Description
getRedisKey ( string $key ) : string Prepends the given key with a user-defined prefix (if any).
lockSession ( $sessionId ) Lock the session data.

Private Methods

Méthode Description
unlockSession ( ) Unlock the session data.

Method Details

__construct() public méthode

Redis session storage constructor.
public __construct ( Client | Redis $redis, array $options = [], string $prefix = 'session', $locking = true, $spinLockWait = 150000 )
$redis Predis\Client | Redis Redis database connection
$options array Session options
$prefix string Prefix to use when writing session data

__destruct() public méthode

Destructor.
public __destruct ( )

close() public méthode

public close ( )

destroy() public méthode

public destroy ( $sessionId )

gc() public méthode

public gc ( $lifetime )

getRedisKey() protected méthode

Prepends the given key with a user-defined prefix (if any).
protected getRedisKey ( string $key ) : string
$key string key
Résultat string prefixed key

lockSession() protected méthode

Lock the session data.
protected lockSession ( $sessionId )

open() public méthode

public open ( $savePath, $sessionName )

read() public méthode

public read ( $sessionId )

setTtl() public méthode

Change the default TTL.
public setTtl ( integer $ttl )
$ttl integer

write() public méthode

public write ( $sessionId, $data )

Property Details

$locked protected_oe property

Indicates an active session lock
protected $locked

$locking protected_oe property

Indicates an sessions should be locked
protected $locking

$prefix protected_oe property

protected string $prefix
Résultat string

$redis protected_oe property

protected Client,Predis|Redis $redis
Résultat Predis\Client | Redis

$ttl protected_oe property

protected int $ttl
Résultat integer