PHP Класс Horde_Kolab_Storage_Cache, horde

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-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Gunnar Wrobel ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_data_caches array Data cache instances.
$_horde_cache Horde_Cache The link to the horde cache.

Открытые методы

Метод Описание
__construct ( Horde_Cache $cache ) Constructor.
deleteAttachment ( string $data_id, string $obid, string $attachment_id ) Delete a cached attachment.
getDataCache ( array $data_params ) : Horde_Kolab_Storage_Cache_Data Return a data cache.
loadAttachment ( string $data_id, string $obid, string $attachment_id ) : resource Retrieve an attachment.
loadData ( string $data_id ) : string Retrieve data set.
loadList ( string $list_id ) : string Retrieve list data.
requireParameter ( $parameters, $type, $key ) Determine if a necessary parameter is set.
storeAttachment ( string $data_id, string $obid, string $attachment_id, resource $data ) Store an attachment.
storeData ( string $data_id, string $data ) Cache data set.
storeList ( string $list_id, string $data ) Cache list data.

Приватные методы

Метод Описание
_getAttachmentId ( string $data_id, string $obid, string $attachment_id ) : string Compose the attachment key.
_getDataId ( array $data_params ) : string Compose the data key.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( Horde_Cache $cache )
$cache Horde_Cache The global cache for temporary data storage.

deleteAttachment() публичный Метод

Delete a cached attachment.
public deleteAttachment ( string $data_id, string $obid, string $attachment_id )
$data_id string ID of the data set.
$obid string Object backend id.
$attachment_id string Attachment ID.

getDataCache() публичный Метод

Return a data cache.
public getDataCache ( array $data_params ) : Horde_Kolab_Storage_Cache_Data
$data_params array Return the data cache for a data set with these parameters.
Результат Horde_Kolab_Storage_Cache_Data The data cache.

loadAttachment() публичный Метод

Retrieve an attachment.
public loadAttachment ( string $data_id, string $obid, string $attachment_id ) : resource
$data_id string ID of the data set.
$obid string Object backend id.
$attachment_id string Attachment ID.
Результат resource A stream opened to the attachment data.

loadData() публичный Метод

Retrieve data set.
public loadData ( string $data_id ) : string
$data_id string ID of the data set.
Результат string The cached data set.

loadList() публичный Метод

Retrieve list data.
public loadList ( string $list_id ) : string
$list_id string ID of the connection matching the list.
Результат string The data of the object.

requireParameter() публичный Метод

Determine if a necessary parameter is set.
public requireParameter ( $parameters, $type, $key )

storeAttachment() публичный Метод

Store an attachment.
public storeAttachment ( string $data_id, string $obid, string $attachment_id, resource $data )
$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.

storeData() публичный Метод

Cache data set.
public storeData ( string $data_id, string $data )
$data_id string ID of the data set.
$data string The data to be cached.

storeList() публичный Метод

Cache list data.
public storeList ( string $list_id, string $data )
$list_id string ID of the connection matching the list.
$data string The data to be cached.

Описание свойств

$_data_caches защищенное свойство

Data cache instances.
protected array $_data_caches
Результат array

$_horde_cache защищенное свойство

The link to the horde cache.
protected Horde_Cache $_horde_cache
Результат Horde_Cache