\Horde_Kolab_Storage_Data_Old

The Kolab_Data class represents a data type in a Kolab storage folder on the Kolab server.

Copyright 2009-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.

Summary

Methods
Properties
Constants
__construct()
delete()
deleteAll()
move()
save()
synchronize()
storageIdExists()
generateUID()
getAttachment()
getObjectArray()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
_updateHistory()
$_folder
$_type
$_driver
$_factory
$_object_type
$_data_version
$_cache
$_cache_key
$_type_key
$_cache_cyrus_optimize
N/A

Properties

$_folder

$_folder : \Kolab_Folder

The link to the parent folder object.

Type

\Kolab_Folder

$_type

$_type : string

The folder type.

Type

string

$_object_type

$_object_type : string

The object type of the data.

Type

string

$_data_version

$_data_version : integer

The version of the data.

Type

integer

$_cache

$_cache : \Kolab_Cache

The data cache.

Type

\Kolab_Cache

$_cache_key

$_cache_key : string

The Id of this data object in the cache.

Type

string

$_type_key

$_type_key : string

An addition to the cache key in case we are operating on something other than the default type.

Type

string

$_cache_cyrus_optimize

$_cache_cyrus_optimize : boolean

Do we optimize for cyrus IMAPD?

Type

boolean

Methods

__construct()

__construct(string  $folder, string  $type, \Horde_Kolab_Storage_Driver  $driver, \Horde_Kolab_Storage_Factory  $factory, string  $object_type = null, integer  $data_version = 1) 

Creates a Kolab Folder Data representation.

Parameters

string $folder

Name/ID of the folder.

string $type

Type of the folder.

\Horde_Kolab_Storage_Driver $driver

The primary connection driver.

\Horde_Kolab_Storage_Factory $factory

The factory.

string $object_type

Type of the objects we want to read.

integer $data_version

Format version of the object data.

delete()

delete(string  $object_uid) : boolean|\PEAR_Error

Delete the specified message from this folder.

Parameters

string $object_uid

Id of the message to be deleted.

Returns

boolean|\PEAR_Error —

True is successful, false if the message does not exist.

deleteAll()

deleteAll() : boolean|\PEAR_Error

Delete all messages from the current folder.

Returns

boolean|\PEAR_Error —

True if successful.

move()

move(string  $object_uid, string  $new_share) : boolean|\PEAR_Error

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

Parameters

string $object_uid

ID of the message to be deleted.

string $new_share

ID of the target share.

Returns

boolean|\PEAR_Error —

True is successful, false if the object does not exist.

save()

save(array  $object, string  $old_object_id = null) : boolean

Save an object.

Parameters

array $object

The array that holds the data object.

string $old_object_id

The id of the object if it existed before.

Throws

\Horde_Kolab_Storage_Exception

In case the given old object id is invalid or an error occured while saving the data.

Returns

boolean —

True on success.

synchronize()

synchronize(string  $history_ignore = null) : NULL

Synchronize the data cache for the current folder.

Parameters

string $history_ignore

Object uid that should not be updated in the History

Returns

NULL

storageIdExists()

storageIdExists(integer  $uid) : boolean

Test if the storage ID exists.

Parameters

integer $uid

The storage ID.

Returns

boolean —

True if the ID exists.

generateUID()

generateUID() : string

Generate a unique object id.

Returns

string —

The unique id.

getAttachment()

getAttachment(string  $attachment_id) : string|\PEAR_Error

Return the specified attachment.

Parameters

string $attachment_id

The attachment id.

Returns

string|\PEAR_Error —

The attachment data as a string.

getObjectArray()

getObjectArray() : array

Retrieve all objects in the current folder as an array.

Returns

array —

The object data array.

_updateHistory()

_updateHistory(string  $object_uid, integer  $mod_ts, string  $action) : NULL

Update the Horde history in case an element was modified outside of Horde.

Parameters

string $object_uid

Object uid that should be updated.

integer $mod_ts

Timestamp of the modification.

string $action

The action that was performed.

Returns

NULL