Documentation

Horde_Kolab_Storage_Cache
in package

The Kolab_Cache class provides a cache for Kolab groupware objects.

The Horde_Kolab_Storage_Cache singleton instance provides caching for all storage folders. So before operating on the cache data it is necessary to load the desired folder data. Before switching the folder the cache data should be saved.

This class does not offer a lot of safeties and is primarily intended to be used within the Horde_Kolab_Storage_Data class.

Copyright 2007-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.

Tags
category

Kolab

author

Gunnar Wrobel wrobel@pardus.de

license

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

Table of Contents

$_data_caches  : array<string|int, mixed>
Data cache instances.
$_horde_cache  : Horde_Cache
The link to the horde cache.
__construct()  : mixed
Constructor.
deleteAttachment()  : mixed
Delete a cached attachment.
getDataCache()  : Horde_Kolab_Storage_Cache_Data
Return a data cache.
loadAttachment()  : resource
Retrieve an attachment.
loadData()  : string
Retrieve data set.
loadList()  : string
Retrieve list data.
requireParameter()  : mixed
Determine if a necessary parameter is set.
storeAttachment()  : mixed
Store an attachment.
storeData()  : mixed
Cache data set.
storeList()  : mixed
Cache list data.
_getAttachmentId()  : string
Compose the attachment key.
_getDataId()  : string
Compose the data key.

Properties

$_data_caches

Data cache instances.

protected array<string|int, mixed> $_data_caches

$_horde_cache

The link to the horde cache.

protected Horde_Cache $_horde_cache

Methods

__construct()

Constructor.

public __construct(Horde_Cache $cache) : mixed
Parameters
$cache : Horde_Cache

The global cache for temporary data storage.

Return values
mixed

deleteAttachment()

Delete a cached attachment.

public deleteAttachment(string $data_id, string $obid, string $attachment_id) : mixed
Parameters
$data_id : string

ID of the data set.

$obid : string

Object backend id.

$attachment_id : string

Attachment ID.

Return values
mixed

loadAttachment()

Retrieve an attachment.

public loadAttachment(string $data_id, string $obid, string $attachment_id) : resource
Parameters
$data_id : string

ID of the data set.

$obid : string

Object backend id.

$attachment_id : string

Attachment ID.

Return values
resource

A stream opened to the attachment data.

loadData()

Retrieve data set.

public loadData(string $data_id) : string
Parameters
$data_id : string

ID of the data set.

Return values
string

The cached data set.

loadList()

Retrieve list data.

public loadList(string $list_id) : string
Parameters
$list_id : string

ID of the connection matching the list.

Return values
string

The data of the object.

requireParameter()

Determine if a necessary parameter is set.

public requireParameter(mixed $parameters, mixed $type, mixed $key) : mixed
Parameters
$parameters : mixed
$type : mixed
$key : mixed
Tags
throws
Horde_Kolab_Storage_Exception

In case the parameter is missing.

Return values
mixed

storeAttachment()

Store an attachment.

public storeAttachment(string $data_id, string $obid, string $attachment_id, resource $data) : mixed
Parameters
$data_id : string

ID of the data set.

$obid : string

Object backend id.

$attachment_id : string

Attachment ID.

$data : resource

A stream opened to the attachment data.

Return values
mixed

storeData()

Cache data set.

public storeData(string $data_id, string $data) : mixed
Parameters
$data_id : string

ID of the data set.

$data : string

The data to be cached.

Return values
mixed

storeList()

Cache list data.

public storeList(string $list_id, string $data) : mixed
Parameters
$list_id : string

ID of the connection matching the list.

$data : string

The data to be cached.

Return values
mixed

_getAttachmentId()

Compose the attachment key.

private _getAttachmentId(string $data_id, string $obid, string $attachment_id) : string
Parameters
$data_id : string

ID of the data set.

$obid : string

Object backend id.

$attachment_id : string

Attachment ID.

Return values
string

The attachment cache ID.

_getDataId()

Compose the data key.

private _getDataId(array<string|int, mixed> $data_params) : string
Parameters
$data_params : array<string|int, mixed>

Return the data ID for a data set with these parameters.

Return values
string

The data cache ID.

Search results