PHP Class Horde_Kolab_Storage_Data_Cached, horde

Copyright 2011-2014 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.
Inheritance: extends Horde_Kolab_Storage_Data_Base
Datei anzeigen Open project: horde/horde

Protected Properties

Property Type Description
$_data_cache Horde_Kolab_Storage_Cache_Data The data cache.
$_init boolean Has the cache already been loaded and validated?

Public Methods

Method Description
__construct ( Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Driver $driver, Horde_Kolab_Storage_Factory $factory, Horde_Kolab_Storage_Cache $cache, string $type = null, integer $version = 1 ) Constructor.
getAttachment ( string $object_id, string $attachment_id ) : resource Returns the specified attachment.
getBackendId ( $object_id ) : string Return the backend ID for the given object ID.
getDuplicates ( ) : array Retrieve the list of object duplicates.
getErrors ( ) : array Retrieve the list of object errors.
getObject ( string $object_id ) : array Return the specified object.
getObjectIds ( ) : array Retrieve all object ids in the current folder.
getObjectToBackend ( ) : array Return the mapping of object IDs to backend IDs.
getObjects ( ) : array Retrieve all objects in the current folder.
objectIdExists ( string $object_id ) : boolean Check if the given object ID exists.
synchronize ( $params = [] ) : null Synchronize the query data with the information from the backend.

Protected Methods

Method Description
_init ( ) Check if the cache has been initialized at all and synchronize it if not.
_isInitialized ( ) : null Check if the cache has been initialized.

Private Methods

Method Description
_completeSynchronization ( Horde_Kolab_Storage_Folder_Stamp $stamp, array $params = [] ) : null Perform a complete synchronization.

Method Details

__construct() public method

Constructor.
public __construct ( Horde_Kolab_Storage_Folder $folder, Horde_Kolab_Storage_Driver $driver, Horde_Kolab_Storage_Factory $factory, Horde_Kolab_Storage_Cache $cache, string $type = null, integer $version = 1 )
$folder Horde_Kolab_Storage_Folder The folder to retrieve the data from.
$driver Horde_Kolab_Storage_Driver The primary connection driver.
$factory Horde_Kolab_Storage_Factory The factory.
$cache Horde_Kolab_Storage_Cache The cache storing data for this decorator.
$type string The type of data we want to access in the folder.
$version integer Format version of the object data.

_init() protected method

Check if the cache has been initialized at all and synchronize it if not.
protected _init ( )

_isInitialized() protected method

Check if the cache has been initialized.
protected _isInitialized ( ) : null
return null

getAttachment() public method

Returns the specified attachment.
public getAttachment ( string $object_id, string $attachment_id ) : resource
$object_id string The object id. @since Kolab_Storage 2.1.0
$attachment_id string The attachment id.
return resource An open stream to the attachment data.

getBackendId() public method

Return the backend ID for the given object ID.
public getBackendId ( $object_id ) : string
return string The backend ID for the object.

getDuplicates() public method

Retrieve the list of object duplicates.
public getDuplicates ( ) : array
return array The list of duplicates.

getErrors() public method

Retrieve the list of object errors.
public getErrors ( ) : array
return array The list of errors.

getObject() public method

Return the specified object.
public getObject ( string $object_id ) : array
$object_id string The object id.
return array The object data as an array.

getObjectIds() public method

Retrieve all object ids in the current folder.
public getObjectIds ( ) : array
return array The object ids.

getObjectToBackend() public method

Return the mapping of object IDs to backend IDs.
public getObjectToBackend ( ) : array
return array The object to backend mapping.

getObjects() public method

Retrieve all objects in the current folder.
public getObjects ( ) : array
return array An array of all objects.

objectIdExists() public method

Check if the given object ID exists.
public objectIdExists ( string $object_id ) : boolean
$object_id string The object ID.
return boolean True if the ID was found, false otherwise.

synchronize() public method

Synchronize the query data with the information from the backend.
See also: Horde_Kolab_Storage_Query In addition to the parameters of the base class(es), the following may be passed as well: - logger: (Horde_Log_Logger) A logger instance.
public synchronize ( $params = [] ) : null
return null

Property Details

$_data_cache protected_oe property

The data cache.
protected Horde_Kolab_Storage_Cache_Data $_data_cache
return Horde_Kolab_Storage_Cache_Data

$_init protected_oe property

Has the cache already been loaded and validated?
protected bool $_init
return boolean