PHP Class Horde_Kolab_Storage_Cache_Data, horde

Author: Thomas Jarosch ([email protected])
Author: Gunnar Wrobel ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_cache Horde_Kolab_Storage_Cache The core cache driver.
$_data array The cache data.
$_data_id string Data ID.
$_parameters array Data parameters that will be recorded in the cache.

Méthodes publiques

Méthode Description
__construct ( Horde_Kolab_Storage_Cache $cache, array $parameters = null ) Constructor.
backendMap ( array $backend_ids ) : array Maps backend IDs to object ids.
getAttachment ( string $obid, string $attachment_id ) : resource Retrieves an attachment.
getAttachmentByName ( string $obid, $name ) : array Retrieves an attachment by name.
getAttachmentByType ( string $obid, $type ) : array Retrieves an attachment by name.
getBackendToObject ( ) : array Returns the backend ID to object ID mapping.
getDataId ( ) : string Returns the ID for the data cache.
getDuplicates ( ) : array Retrieves the list of object duplicates.
getErrors ( ) : array Retrieves the list of object errors.
getLastSync ( ) : integer Returns the timestamp of the last synchronization.
getObjectByBackendId ( string $obid ) : array Retrieves the specified object from the cache.
getObjectToBackend ( ) : array Returns the object ID to backend ID mapping.
getObjects ( ) : array Retrieves the object list from the cache.
getQuery ( string $key ) : mixed Returns query information.
getStamp ( ) : Horde_Kolab_Storage_Folder_Stamp Retrieves the last stamp.
getVersion ( ) : string Retrieves the data version.
hasQuery ( string $key ) : boolean Is the specified query data available in the cache?
isInitialized ( ) : boolean Checks if the cache has been initialized.
reset ( ) Initializes the cache structure.
save ( ) Caches the data.
setDataId ( string $data_id ) Sets the ID for the data cache.
setQuery ( string $key, mixed $data ) Sets query information.
store ( array $objects, Horde_Kolab_Storage_Folder_Stamp $stamp, string $version, array $delete = [] ) Stores the objects list in the cache.

Méthodes protégées

Méthode Description
_checkInit ( string $key ) Verifies that the data cache is initialized.
_fetchCacheEntry ( string $key ) : array Fetches the specified cache entry in case it is present.
_load ( ) : mixed Retrieves the cached list data.

Method Details

__construct() public méthode

Constructor.
public __construct ( Horde_Kolab_Storage_Cache $cache, array $parameters = null )
$cache Horde_Kolab_Storage_Cache The core cache driver.
$parameters array Data set parameters that are only recorded and have no further impact.

_checkInit() protected méthode

Verifies that the data cache is initialized.
protected _checkInit ( string $key )
$key string The key in the cached data array.

_fetchCacheEntry() protected méthode

Returns an empty array otherwise.
protected _fetchCacheEntry ( string $key ) : array
$key string The key in the cached data array.
Résultat array The cache entry.

_load() protected méthode

Retrieves the cached list data.
protected _load ( ) : mixed
Résultat mixed The data of the object.

backendMap() public méthode

Maps backend IDs to object ids.
public backendMap ( array $backend_ids ) : array
$backend_ids array The list of backend IDs
Résultat array A list that associates object IDs (values) to backend IDs (keys).

getAttachment() public méthode

Retrieves an attachment.
public getAttachment ( string $obid, string $attachment_id ) : resource
$obid string Object backend id.
$attachment_id string Attachment ID.
Résultat resource A stream opened to the attachment data.

getAttachmentByName() public méthode

Retrieves an attachment by name.
public getAttachmentByName ( string $obid, $name ) : array
$obid string Object backend id.
Résultat array An array of attachment resources.

getAttachmentByType() public méthode

Retrieves an attachment by name.
public getAttachmentByType ( string $obid, $type ) : array
$obid string Object backend id.
Résultat array An array of attachment resources.

getBackendToObject() public méthode

Returns the backend ID to object ID mapping.
public getBackendToObject ( ) : array
Résultat array The mapping.

getDataId() public méthode

Returns the ID for the data cache.
public getDataId ( ) : string
Résultat string The unique ID for the data used when caching it.

getDuplicates() public méthode

Retrieves the list of object duplicates.
public getDuplicates ( ) : array
Résultat array The list of duplicates.

getErrors() public méthode

Retrieves the list of object errors.
public getErrors ( ) : array
Résultat array The list of errors.

getLastSync() public méthode

Returns the timestamp of the last synchronization.
public getLastSync ( ) : integer
Résultat integer Timestamp of the last sync.

getObjectByBackendId() public méthode

Retrieves the specified object from the cache.
public getObjectByBackendId ( string $obid ) : array
$obid string The object ID to fetch.
Résultat array The list of objects.

getObjectToBackend() public méthode

Returns the object ID to backend ID mapping.
public getObjectToBackend ( ) : array
Résultat array The mapping.

getObjects() public méthode

Retrieves the object list from the cache.
public getObjects ( ) : array
Résultat array The list of objects.

getQuery() public méthode

Returns query information.
public getQuery ( string $key ) : mixed
$key string The query key.
Résultat mixed The query data.

getStamp() public méthode

Retrieves the last stamp.
public getStamp ( ) : Horde_Kolab_Storage_Folder_Stamp
Résultat Horde_Kolab_Storage_Folder_Stamp The last recorded stamp.

getVersion() public méthode

Retrieves the data version.
public getVersion ( ) : string
Résultat string The version of the stored data.

hasQuery() public méthode

Is the specified query data available in the cache?
public hasQuery ( string $key ) : boolean
$key string The query key.
Résultat boolean True in case cached data is available.

isInitialized() public méthode

Checks if the cache has been initialized.
public isInitialized ( ) : boolean
Résultat boolean True if cache data is available.

reset() public méthode

Initializes the cache structure.
public reset ( )

save() public méthode

Caches the data.
public save ( )

setDataId() public méthode

Sets the ID for the data cache.
public setDataId ( string $data_id )
$data_id string The unique ID for the data used when caching it.

setQuery() public méthode

Sets query information.
public setQuery ( string $key, mixed $data )
$key string The query key.
$data mixed The query data.

store() public méthode

Stores the objects list in the cache.
public store ( array $objects, Horde_Kolab_Storage_Folder_Stamp $stamp, string $version, array $delete = [] )
$objects array
$stamp Horde_Kolab_Storage_Folder_Stamp The current stamp.
$version string The format version of the provided data.
$delete array Backend IDs that were removed.

Property Details

$_cache protected_oe property

The core cache driver.
protected Horde_Kolab_Storage_Cache $_cache
Résultat Horde_Kolab_Storage_Cache

$_data protected_oe property

The cache data.
protected array $_data
Résultat array

$_data_id protected_oe property

Data ID.
protected string $_data_id
Résultat string

$_parameters protected_oe property

Data parameters that will be recorded in the cache.
protected array $_parameters
Résultat array