PHP Class 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.
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_data_caches array Data cache instances.
$_horde_cache Horde_Cache The link to the horde cache.

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
_getAttachmentId ( string $data_id, string $obid, string $attachment_id ) : string Compose the attachment key.
_getDataId ( array $data_params ) : string Compose the data key.

Method Details

__construct() public méthode

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

deleteAttachment() public méthode

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() public méthode

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.
Résultat Horde_Kolab_Storage_Cache_Data The data cache.

loadAttachment() public méthode

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.
Résultat resource A stream opened to the attachment data.

loadData() public méthode

Retrieve data set.
public loadData ( string $data_id ) : string
$data_id string ID of the data set.
Résultat string The cached data set.

loadList() public méthode

Retrieve list data.
public loadList ( string $list_id ) : string
$list_id string ID of the connection matching the list.
Résultat string The data of the object.

requireParameter() public méthode

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

storeAttachment() public méthode

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() public méthode

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() public méthode

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.

Property Details

$_data_caches protected_oe property

Data cache instances.
protected array $_data_caches
Résultat array

$_horde_cache protected_oe property

The link to the horde cache.
protected Horde_Cache $_horde_cache
Résultat Horde_Cache