\Horde_SessionHandler_Storage_Stack

SessionHandler storage implementation that will loop through a list of storage drivers to handle the session information.

This driver allows for use of caching backends on top of persistent backends, for example.

Copyright 2010-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
__sleep()
setLogger()
open()
close()
read()
write()
destroy()
gc()
getSessionIDs()
$readonly
No constants found
No protected methods found
$_params
$_stack
N/A
No private methods found
No private properties found
N/A

Properties

$readonly

$readonly : boolean

Access session read-only?

Type

boolean

$_params

$_params : array

Hash containing connection parameters.

Type

array

$_stack

$_stack : array

Stack of storage objects.

Type

array

Methods

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

Parameters:

stack - (array) [REQUIRED] A list of storage objects to loop
        through, in order of priority. The last entry is considered
        the "master" server.

Throws

\InvalidArgumentException

__sleep()

__sleep() 

Storage objects do not support serialization.

setLogger()

setLogger(\Horde_Log_Logger  $log) 

Set the logger object.

Parameters

\Horde_Log_Logger $log

open()

open(string  $save_path = null, string  $session_name = null) 

Open the backend.

Parameters

string $save_path

The path to the session object.

string $session_name

The name of the session.

close()

close() 

Close the backend.

read()

read(string  $id) : string

Read the data for a particular session identifier from the backend.

Parameters

string $id

The session identifier.

Returns

string —

The session data.

write()

write(string  $id, string  $session_data) : boolean

Write session data to the backend.

Parameters

string $id

The session identifier.

string $session_data

The session data.

Returns

boolean —

True on success, false otherwise.

destroy()

destroy(string  $id) : boolean

Destroy the data for a particular session identifier in the backend.

This method should only be called internally by PHP via session_set_save_handler().

Parameters

string $id

The session identifier.

Returns

boolean —

True on success, false otherwise.

gc()

gc(integer  $maxlifetime = 300) : boolean

Garbage collect stale sessions from the backend.

This method should only be called internally by PHP via session_set_save_handler().

Parameters

integer $maxlifetime

The maximum age of a session.

Returns

boolean —

True on success, false otherwise.

getSessionIDs()

getSessionIDs() : array

Get a list of the valid session identifiers.

Returns

array —

A list of valid session identifiers.