Horde_Core_HashTable_Vfs
extends Horde_HashTable_Vfs
in package
Vfs HashTable implementation that uses Horde configuration for the VFS, allows filenames to be directly used in set(), and enables stream data to be returned from get().
This is a common use-case for Horde applications (i.e. it allows direct manipulation of filedata uploaded from the browser without needing to read the file into memory), and allows us to take advantage of these VFS features in combination with the cleanup and simplicity features of HashTable.
Tags
Table of Contents
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).
- _get() : mixed
- _set() : mixed
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.
_get()
protected
_get(mixed $keys) : mixed
Parameters
- $keys : mixed
_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.