Documentation

Horde_Core_HashTable_PersistentSession extends Horde_Core_HashTable_Vfs
in package
implements Horde_Registry_Logout_Task

Hashtable implementation that ensures persistency of data within a given session, without using session storage. Instead, VFS is used to store the data.

The data is attempted to be removed at the end of the session, so there is no guarantee of persistence across sessions.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2014-2017 Horde LLC

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

since
2.13.0

Table of Contents

Interfaces

Horde_Registry_Logout_Task
Interface to register a logout task.

Constants

SESS_KEY  = 'psession_keys'
Session data storage key.
VFS_PATH  = '.horde/core/psession_data'
The virtual path to use for VFS data (temporary storage).

Properties

$_stream  : bool
Return get data as stream objects?

Methods

__construct()  : mixed
gc()  : mixed
Perform garbage collection on the VFS path.
getStream()  : mixed
Get data associated with a key(s).
logoutTask()  : mixed
Function to run on logout.
set()  : mixed
_get()  : mixed
_getKeys()  : array<string|int, mixed>
Return the list of keys that have been saved to VFS this session.
_set()  : mixed

Constants

VFS_PATH

The virtual path to use for VFS data (temporary storage).

public mixed VFS_PATH = '.horde/core/psession_data'

Properties

$_stream

Return get data as stream objects?

protected bool $_stream = \false

Methods

__construct()

public __construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
$params : array<string|int, mixed> = array()

gc()

Perform garbage collection on the VFS path.

public gc(int $expire) : mixed
Parameters
$expire : int

Expire entries older than this value (in seconds).

getStream()

Get data associated with a key(s).

public getStream(mixed $keys) : mixed
Parameters
$keys : mixed

The key or an array of keys.

Return values
mixed

The string/array on success (return type is the type of $keys); Horde_Stream objects are returned on success, false value(s) on failure.

set()

public set(mixed $key, mixed $val[, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
$key : mixed
$val : mixed
$opts : array<string|int, mixed> = array()

_get()

protected _get(mixed $keys) : mixed
Parameters
$keys : mixed

_getKeys()

Return the list of keys that have been saved to VFS this session.

protected _getKeys() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of keys.

_set()

protected _set(mixed $key, mixed $val, array<string|int, mixed> $opts) : mixed
Parameters
$key : mixed
$val : mixed
$opts : array<string|int, mixed>

Additional option honored in this driver:

  • filename: (boolean) If true, $val is a filename containing the data to be saved rather than the data itself.

        
On this page

Search results