Horde_SessionHandler_Storage
in package
This is the abstract class that all SessionHandler storage drivers inherit from.
Tags
Table of Contents
Properties
- $readonly : bool
- Access session read-only?
- $_params : array<string|int, mixed>
- Hash containing connection parameters.
Methods
- __construct() : mixed
- Constructor.
- __sleep() : mixed
- Storage objects do not support serialization.
- close() : mixed
- Close the backend.
- destroy() : bool
- Destroy the data for a particular session identifier in the backend.
- gc() : bool
- Garbage collect stale sessions from the backend.
- getSessionIDs() : array<string|int, mixed>
- Get a list of the valid session identifiers.
- open() : mixed
- Open the backend.
- read() : string
- Read the data for a particular session identifier from the backend.
- setLogger() : mixed
- Set the logger object.
- write() : bool
- Write session data to the backend.
- isValidSessionID() : bool
- Validate a session id against the schema mentioned in the PHP manual page for session_id()
Properties
$readonly
Access session read-only?
public
bool
$readonly
= \false
$_params
Hash containing connection parameters.
protected
array<string|int, mixed>
$_params
= array()
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Configuration parameters.
__sleep()
Storage objects do not support serialization.
public
__sleep() : mixed
close()
Close the backend.
public
abstract close() : mixed
Tags
destroy()
Destroy the data for a particular session identifier in the backend.
public
abstract destroy(string $id) : bool
This method should only be called internally by PHP via session_set_save_handler().
Parameters
- $id : string
-
The session identifier.
Return values
bool —True on success, false otherwise.
gc()
Garbage collect stale sessions from the backend.
public
abstract gc([int $maxlifetime = 300 ]) : bool
This method should only be called internally by PHP via session_set_save_handler().
Parameters
- $maxlifetime : int = 300
-
The maximum age of a session.
Return values
bool —True on success, false otherwise.
getSessionIDs()
Get a list of the valid session identifiers.
public
abstract getSessionIDs() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —A list of valid session identifiers.
open()
Open the backend.
public
abstract open([string $save_path = null ][, string $session_name = null ]) : mixed
Parameters
- $save_path : string = null
-
The path to the session object.
- $session_name : string = null
-
The name of the session.
Tags
read()
Read the data for a particular session identifier from the backend.
public
abstract read(string $id) : string
Parameters
- $id : string
-
The session identifier.
Return values
string —The session data.
setLogger()
Set the logger object.
public
setLogger(Horde_Log_Logger $log) : mixed
Parameters
- $log : Horde_Log_Logger
write()
Write session data to the backend.
public
abstract write(string $id, string $session_data) : bool
Parameters
- $id : string
-
The session identifier.
- $session_data : string
-
The session data.
Return values
bool —True on success, false otherwise.
isValidSessionID()
Validate a session id against the schema mentioned in the PHP manual page for session_id()
protected
isValidSessionID(string $id) : bool
Parameters
- $id : string