PHP Класс Horde_Kolab_Storage_Cache_Data, horde

Автор: Thomas Jarosch ([email protected])
Автор: Gunnar Wrobel ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$_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.

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

Метод Описание
__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.

Защищенные методы

Метод Описание
_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.

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

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

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() защищенный Метод

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

_fetchCacheEntry() защищенный Метод

Returns an empty array otherwise.
protected _fetchCacheEntry ( string $key ) : array
$key string The key in the cached data array.
Результат array The cache entry.

_load() защищенный Метод

Retrieves the cached list data.
protected _load ( ) : mixed
Результат mixed The data of the object.

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

Maps backend IDs to object ids.
public backendMap ( array $backend_ids ) : array
$backend_ids array The list of backend IDs
Результат array A list that associates object IDs (values) to backend IDs (keys).

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

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

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

Retrieves an attachment by name.
public getAttachmentByName ( string $obid, $name ) : array
$obid string Object backend id.
Результат array An array of attachment resources.

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

Retrieves an attachment by name.
public getAttachmentByType ( string $obid, $type ) : array
$obid string Object backend id.
Результат array An array of attachment resources.

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

Returns the backend ID to object ID mapping.
public getBackendToObject ( ) : array
Результат array The mapping.

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

Returns the ID for the data cache.
public getDataId ( ) : string
Результат string The unique ID for the data used when caching it.

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

Retrieves the list of object duplicates.
public getDuplicates ( ) : array
Результат array The list of duplicates.

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

Retrieves the list of object errors.
public getErrors ( ) : array
Результат array The list of errors.

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

Returns the timestamp of the last synchronization.
public getLastSync ( ) : integer
Результат integer Timestamp of the last sync.

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

Retrieves the specified object from the cache.
public getObjectByBackendId ( string $obid ) : array
$obid string The object ID to fetch.
Результат array The list of objects.

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

Returns the object ID to backend ID mapping.
public getObjectToBackend ( ) : array
Результат array The mapping.

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

Retrieves the object list from the cache.
public getObjects ( ) : array
Результат array The list of objects.

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

Returns query information.
public getQuery ( string $key ) : mixed
$key string The query key.
Результат mixed The query data.

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

Retrieves the last stamp.
public getStamp ( ) : Horde_Kolab_Storage_Folder_Stamp
Результат Horde_Kolab_Storage_Folder_Stamp The last recorded stamp.

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

Retrieves the data version.
public getVersion ( ) : string
Результат string The version of the stored data.

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

Is the specified query data available in the cache?
public hasQuery ( string $key ) : boolean
$key string The query key.
Результат boolean True in case cached data is available.

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

Checks if the cache has been initialized.
public isInitialized ( ) : boolean
Результат boolean True if cache data is available.

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

Initializes the cache structure.
public reset ( )

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

Caches the data.
public save ( )

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

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() публичный Метод

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

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

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.

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

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

The core cache driver.
protected Horde_Kolab_Storage_Cache $_cache
Результат Horde_Kolab_Storage_Cache

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

The cache data.
protected array $_data
Результат array

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

Data ID.
protected string $_data_id
Результат string

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

Data parameters that will be recorded in the cache.
protected array $_parameters
Результат array