Horde_SessionHandler_Storage_Hashtable
extends Horde_SessionHandler_Storage
in package
Horde_HashTable SessionHandler driver.
Tags
Table of Contents
Properties
- $readonly : bool
- Access session read-only?
- $_hash : Horde_HashTable
- HashTable object.
- $_id : string
- Current session ID.
- $_params : array<string|int, mixed>
- Hash containing connection parameters.
- $_trackID : string
- The ID used for session tracking.
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.
- trackGC() : mixed
- Do garbage collection for session tracking information.
- write() : bool
- Write session data to the backend.
- _getTrackIds() : array<string|int, mixed>
- Get the tracking IDs.
- 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
$_hash
HashTable object.
protected
Horde_HashTable
$_hash
$_id
Current session ID.
protected
string
$_id
$_params
Hash containing connection parameters.
protected
array<string|int, mixed>
$_params
= array()
$_trackID
The ID used for session tracking.
protected
string
$_trackID
= 'horde_sessions_track_ht'
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Parameters:
- hashtable: (Horde_HashTable) [REQUIRED] A Horde_HashTable object. - track: (boolean) Track active sessions?
__sleep()
Storage objects do not support serialization.
public
__sleep() : mixed
close()
Close the backend.
public
close() : mixed
destroy()
Destroy the data for a particular session identifier in the backend.
public
destroy(mixed $id) : bool
Parameters
- $id : mixed
-
The session identifier.
Return values
bool —True on success, false otherwise.
gc()
Garbage collect stale sessions from the backend.
public
gc([mixed $maxlifetime = 300 ]) : bool
Parameters
- $maxlifetime : mixed = 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
getSessionIDs() : array<string|int, mixed>
Return values
array<string|int, mixed> —A list of valid session identifiers.
open()
Open the backend.
public
open([mixed $save_path = null ][, mixed $session_name = null ]) : mixed
Parameters
- $save_path : mixed = null
-
The path to the session object.
- $session_name : mixed = null
-
The name of the session.
read()
Read the data for a particular session identifier from the backend.
public
read(mixed $id) : string
Parameters
- $id : mixed
-
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
trackGC()
Do garbage collection for session tracking information.
public
trackGC() : mixed
write()
Write session data to the backend.
public
write(mixed $id, mixed $session_data) : bool
Parameters
- $id : mixed
-
The session identifier.
- $session_data : mixed
-
The session data.
Return values
bool —True on success, false otherwise.
_getTrackIds()
Get the tracking IDs.
protected
_getTrackIds() : array<string|int, mixed>
Return values
array<string|int, mixed> —Tracking IDs.
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