PHP 클래스 Horde_Kolab_Storage_Cache_Data, horde

저자: Thomas Jarosch ([email protected])
저자: Gunnar Wrobel ([email protected])
파일 보기 프로젝트 열기: horde/horde 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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