\Horde_Core_HashTable_Vfs

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.

Summary

Methods
Properties
Constants
__construct()
getStream()
gc()
No public properties found
No constants found
_get()
_set()
$_stream
N/A
No private methods found
No private properties found
N/A

Properties

$_stream

$_stream : boolean

Return get data as stream objects?

Type

boolean

Methods

__construct()

__construct(array  $params = array()) 

Parameters

array $params

getStream()

getStream(mixed  $keys) : mixed

Get data associated with a key(s).

Parameters

mixed $keys

The key or an array of keys.

Returns

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.

gc()

gc(integer  $expire) 

Perform garbage collection on the VFS path.

Parameters

integer $expire

Expire entries older than this value (in seconds).

_get()

_get(  $keys) 

Parameters

$keys

_set()

_set(  $key,   $val, array  $opts) 

Parameters

$key
$val
array $opts

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.