Documentation

Horde_Kolab_Storage_Data extends Horde_Kolab_Storage_Queriable

Defines the Kolab data handler.

Copyright 2011-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
category

Kolab

author

Gunnar Wrobel wrobel@pardus.de

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

QUERY_HISTORY  = 'History'
QUERY_PREFS  = 'Preferences'
Identifies the preferences query
create()  : string
Create a new object.
delete()  : null
Delete the specified objects from this data set.
deleteAll()  : null
Delete all objects from this data set.
deleteBackendIds()  : null
Delete the specified messages from this folder.
fetch()  : array<string|int, mixed>
Retrieves the objects for the given UIDs.
fetchComplete()  : array<string|int, mixed>
Retrieves the complete message for the given UID.
getAttachment()  : resource
Returns the specified attachment.
getAuth()  : string
Return the ID of the current user.
getBackendId()  : string
Return the backend ID for the given object ID.
getDuplicates()  : array<string|int, mixed>
Retrieve the list of object duplicates.
getErrors()  : array<string|int, mixed>
Retrieve the list of object errors.
getId()  : string
Return the ID of this data handler.
getIdParameters()  : array<string|int, mixed>
Return the ID parameters for this data handler.
getObject()  : array<string|int, mixed>
Return the specified object.
getObjectByBackendId()  : array<string|int, mixed>
Retrieve an object in the current folder by backend id.
getObjectIds()  : array<string|int, mixed>
Retrieve all object ids in the current folder.
getObjects()  : array<string|int, mixed>
Retrieve all objects in the current folder.
getObjectsByBackendId()  : array<string|int, mixed>
Retrieve all objects in the current folder by backend id.
getObjectToBackend()  : array<string|int, mixed>
Return the mapping of object IDs to backend IDs.
getPath()  : string
Return the folder path for this data handler.
getQuery()  : Horde_Kolab_Storage_Query
Return a registered query.
getStamp()  : Horde_Kolab_Storage_Folder_Stamp
Report the status of this folder.
getType()  : string
Return the data type represented by this object.
getVersion()  : string
Return the data version.
modify()  : null
Modify an existing object.
move()  : null
Move the specified message from the current folder into a new folder.
objectIdExists()  : bool
Check if the given object ID exists.
registerQuery()  : mixed
Register a query to be updated if the underlying data changes.
setLogger()  : mixed
Set a logger.

Constants

QUERY_HISTORY

public mixed QUERY_HISTORY = 'History'

QUERY_PREFS

Identifies the preferences query

public mixed QUERY_PREFS = 'Preferences'

Methods

create()

Create a new object.

public create(array<string|int, mixed> &$object[, bool $raw = false ]) : string
Parameters
$object : array<string|int, mixed>

The array that holds the object data.

$raw : bool = false

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

Tags
throws
Horde_Kolab_Storage_Exception

In case an error occured while saving the data.

Return values
string —

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

delete()

Delete the specified objects from this data set.

public delete(array<string|int, mixed>|string $object_ids) : null
Parameters
$object_ids : array<string|int, mixed>|string

Id(s) of the object to be deleted.

Return values
null —

deleteAll()

Delete all objects from this data set.

public deleteAll() : null
Return values
null —

deleteBackendIds()

Delete the specified messages from this folder.

public deleteBackendIds(array<string|int, mixed>|string $uids) : null
Parameters
$uids : array<string|int, mixed>|string

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

Return values
null —

fetch()

Retrieves the objects for the given UIDs.

public fetch(array<string|int, mixed> $uids) : array<string|int, mixed>
Parameters
$uids : array<string|int, mixed>

The message UIDs.

Return values
array<string|int, mixed> —

An array of objects.

fetchComplete()

Retrieves the complete message for the given UID.

public fetchComplete(string $uid) : array<string|int, mixed>
Parameters
$uid : string

The message UID.

Return values
array<string|int, mixed> —

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

getAttachment()

Returns the specified attachment.

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

The object id. @since Kolab_Storage 2.1.0

$attachment_id : string

The attachment id.

Return values
resource —

An open stream to the attachment data.

getAuth()

Return the ID of the current user.

public getAuth() : string
Return values
string —

The current user.

getBackendId()

Return the backend ID for the given object ID.

public getBackendId(mixed $object_id) : string
Parameters
$object_id : mixed
Return values
string —

The backend ID for the object.

getDuplicates()

Retrieve the list of object duplicates.

public getDuplicates() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The list of duplicates.

getErrors()

Retrieve the list of object errors.

public getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The list of errors.

getId()

Return the ID of this data handler.

public getId() : string
Return values
string —

The ID.

getIdParameters()

Return the ID parameters for this data handler.

public getIdParameters() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The ID parameters.

getObject()

Return the specified object.

public getObject(string $object_id) : array<string|int, mixed>
Parameters
$object_id : string

The object id.

Return values
array<string|int, mixed> —

The object data as an array.

getObjectByBackendId()

Retrieve an object in the current folder by backend id.

public getObjectByBackendId(string $uid) : array<string|int, mixed>
Parameters
$uid : string

Backend id of the object to be returned.

Return values
array<string|int, mixed> —

An array of all objects.

getObjectIds()

Retrieve all object ids in the current folder.

public getObjectIds() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The object ids.

getObjects()

Retrieve all objects in the current folder.

public getObjects() : array<string|int, mixed>
Return values
array<string|int, mixed> —

An array of all objects.

getObjectsByBackendId()

Retrieve all objects in the current folder by backend id.

public getObjectsByBackendId() : array<string|int, mixed>
Return values
array<string|int, mixed> —

An array of all objects.

getObjectToBackend()

Return the mapping of object IDs to backend IDs.

public getObjectToBackend() : array<string|int, mixed>
Return values
array<string|int, mixed> —

The object to backend mapping.

getPath()

Return the folder path for this data handler.

public getPath() : string
Return values
string —

The folder path.

getType()

Return the data type represented by this object.

public getType() : string
Return values
string —

The type of data this instance handles.

getVersion()

Return the data version.

public getVersion() : string
Return values
string —

The data version.

modify()

Modify an existing object.

public modify(array<string|int, mixed> $object[, bool $raw = false ]) : null
Parameters
$object : array<string|int, mixed>

The array that holds the updated object data.

$raw : bool = false

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

Tags
throws
Horde_Kolab_Storage_Exception

In case an error occured while saving the data.

Return values
null —

move()

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

public move(string $object_id, string $new_folder) : null
Parameters
$object_id : string

ID of the message to be moved.

$new_folder : string

Target folder.

Return values
null —

objectIdExists()

Check if the given object ID exists.

public objectIdExists(string $object_id) : bool
Parameters
$object_id : string

The object ID.

Return values
bool —

True if the ID was found, false otherwise.

setLogger()

Set a logger.

public setLogger(Horde_Log_Logger $logger) : mixed
Parameters
$logger : Horde_Log_Logger

The logger instance.

Return values
mixed —

Search results