RedisClusterSessionHandler
in package
implements
SessionHandlerInterface
Table of Contents
Interfaces
- SessionHandlerInterface
Properties
- $redis : mixed
Methods
- __construct() : mixed
- close() : bool
- Close the session
- destroy() : bool
- Destroy a session
- gc() : int|false
- Cleanup old sessions
- open() : bool
- Initialize session
- read() : string
- Read session data
- write() : bool
- Write session data
Properties
$redis
private
mixed
$redis
Methods
__construct()
public
__construct() : mixed
close()
Close the session
public
close() : bool
Tags
Return values
bool —The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.
destroy()
Destroy a session
public
destroy(mixed $sessionId) : bool
Parameters
- $sessionId : mixed
Tags
Return values
bool —The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.
gc()
Cleanup old sessions
public
gc(mixed $maxLifetime) : int|false
Parameters
- $maxLifetime : mixed
Tags
Return values
int|false —Returns the number of deleted sessions on success, or false on failure. Prior to PHP version 7.1, the function returned true on success. Note this value is returned internally to PHP for processing.
open()
Initialize session
public
open(mixed $savePath, mixed $sessionName) : bool
Parameters
- $savePath : mixed
- $sessionName : mixed
Tags
Return values
bool —The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.
read()
Read session data
public
read(mixed $sessionId) : string
Parameters
- $sessionId : mixed
Tags
Return values
string —Returns an encoded string of the read data. If nothing was read, it must return false. Note this value is returned internally to PHP for processing.
write()
Write session data
public
write(mixed $sessionId, string $data) : bool
Parameters
- $sessionId : mixed
- $data : string
-
The encoded session data. This data is the result of the PHP internally encoding the $_SESSION superglobal to a serialized string and passing it as this parameter. Please note sessions use an alternative serialization method.
Tags
Return values
bool —The return value (usually TRUE on success, FALSE on failure). Note this value is returned internally to PHP for processing.