Constants

QUERY_PREFS

QUERY_PREFS

Identifies the preferences query

QUERY_HISTORY

QUERY_HISTORY

Methods

registerQuery()

registerQuery(string  $name, \Horde_Kolab_Storage_Query  $query) 

Register a query to be updated if the underlying data changes.

Parameters

string $name

The query name.

\Horde_Kolab_Storage_Query $query

The query to register.

getQuery()

getQuery(string  $name = null) : \Horde_Kolab_Storage_Query

Return a registered query.

Parameters

string $name

The query name.

Throws

\Horde_Kolab_Storage_Exception

In case the requested query does not exist.

Returns

\Horde_Kolab_Storage_Query

The requested query.

getPath()

getPath() : string

Return the folder path for this data handler.

Returns

string —

The folder path.

getAuth()

getAuth() : string

Return the ID of the current user.

Returns

string —

The current user.

getId()

getId() : string

Return the ID of this data handler.

Returns

string —

The ID.

getIdParameters()

getIdParameters() : array

Return the ID parameters for this data handler.

Returns

array —

The ID parameters.

getType()

getType() : string

Return the data type represented by this object.

Returns

string —

The type of data this instance handles.

getVersion()

getVersion() : string

Return the data version.

Returns

string —

The data version.

getStamp()

getStamp(\Horde_Kolab_Storage_Folder_Stamp  $previous = null) : \Horde_Kolab_Storage_Folder_Stamp

Report the status of this folder.

Parameters

\Horde_Kolab_Storage_Folder_Stamp $previous

The previous stamp, if available.

Returns

\Horde_Kolab_Storage_Folder_Stamp

The stamp that can be used for detecting folder changes.

create()

create(  $object, boolean  $raw = false) : string

Create a new object.

Parameters

$object
boolean $raw

True if the data to be stored has been provided in raw format.

Throws

\Horde_Kolab_Storage_Exception

In case an error occured while saving the data.

Returns

string —

The ID of the new object or true in case the backend does not support this return value.

modify()

modify(array  $object, boolean  $raw = false) : NULL

Modify an existing object.

Parameters

array $object

The array that holds the updated object data.

boolean $raw

True if the data to be stored has been provided in raw format.

Throws

\Horde_Kolab_Storage_Exception

In case an error occured while saving the data.

Returns

NULL

fetch()

fetch(array  $uids) : array

Retrieves the objects for the given UIDs.

Parameters

array $uids

The message UIDs.

Returns

array —

An array of objects.

fetchComplete()

fetchComplete(string  $uid) : array

Retrieves the complete message for the given UID.

Parameters

string $uid

The message UID.

Returns

array —

The message encapsuled as an array that contains a Horde_Mime_Headers and a Horde_Mime_Part object.

getBackendId()

getBackendId(  $object_id) : string

Return the backend ID for the given object ID.

Parameters

$object_id

Returns

string —

The backend ID for the object.

objectIdExists()

objectIdExists(string  $object_id) : boolean

Check if the given object ID exists.

Parameters

string $object_id

The object ID.

Returns

boolean —

True if the ID was found, false otherwise.

getObject()

getObject(string  $object_id) : array

Return the specified object.

Parameters

string $object_id

The object id.

Returns

array —

The object data as an array.

getAttachment()

getAttachment(string  $object_id, string  $attachment_id) : resource

Returns the specified attachment.

Parameters

string $object_id

The object id. @since Kolab_Storage 2.1.0

string $attachment_id

The attachment id.

Returns

resource —

An open stream to the attachment data.

getObjectIds()

getObjectIds() : array

Retrieve all object ids in the current folder.

Returns

array —

The object ids.

getObjects()

getObjects() : array

Retrieve all objects in the current folder.

Returns

array —

An array of all objects.

getObjectsByBackendId()

getObjectsByBackendId() : array

Retrieve all objects in the current folder by backend id.

Returns

array —

An array of all objects.

getObjectByBackendId()

getObjectByBackendId(string  $uid) : array

Retrieve an object in the current folder by backend id.

Parameters

string $uid

Backend id of the object to be returned.

Returns

array —

An array of all objects.

getObjectToBackend()

getObjectToBackend() : array

Return the mapping of object IDs to backend IDs.

Returns

array —

The object to backend mapping.

getDuplicates()

getDuplicates() : array

Retrieve the list of object duplicates.

Returns

array —

The list of duplicates.

getErrors()

getErrors() : array

Retrieve the list of object errors.

Returns

array —

The list of errors.

move()

move(string  $object_id, string  $new_folder) : NULL

Move the specified message from the current folder into a new folder.

Parameters

string $object_id

ID of the message to be moved.

string $new_folder

Target folder.

Returns

NULL

delete()

delete(array|string  $object_ids) : NULL

Delete the specified objects from this data set.

Parameters

array|string $object_ids

Id(s) of the object to be deleted.

Returns

NULL

deleteAll()

deleteAll() : NULL

Delete all objects from this data set.

Returns

NULL

deleteBackendIds()

deleteBackendIds(array|string  $uids) : NULL

Delete the specified messages from this folder.

Parameters

array|string $uids

Backend id(s) of the message to be deleted.

Returns

NULL

setLogger()

setLogger(\Horde_Log_Logger  $logger) 

Set a logger.

Parameters

\Horde_Log_Logger $logger

The logger instance.