Documentation

Horde_Kolab_Storage_Data_Old
in package

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.

Tags
category

Kolab

author

Stuart Binge omicron@mighty.co.za

author

Thomas Jarosch thomas.jarosch@intra2net.com

author

Gunnar Wrobel wrobel@pardus.de

license

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

Table of Contents

$_cache  : Kolab_Cache
The data cache.
$_cache_cyrus_optimize  : bool
Do we optimize for cyrus IMAPD?
$_cache_key  : string
The Id of this data object in the cache.
$_data_version  : int
The version of the data.
$_driver  : Horde_Kolab_Storage_Driver
The driver for accessing the Kolab storage system.
$_factory  : Horde_Kolab_Storage_Factory
The factory for generating additional resources.
$_folder  : Kolab_Folder
The link to the parent folder object.
$_object_type  : string
The object type of the data.
$_type  : string
The folder type.
$_type_key  : string
An addition to the cache key in case we are operating on something other than the default type.
__construct()  : mixed
Creates a Kolab Folder Data representation.
delete()  : bool|PEAR_Error
Delete the specified message from this folder.
deleteAll()  : bool|PEAR_Error
Delete all messages from the current folder.
generateUID()  : string
Generate a unique object id.
getAttachment()  : string|PEAR_Error
Return the specified attachment.
getObjectArray()  : array<string|int, mixed>
Retrieve all objects in the current folder as an array.
move()  : bool|PEAR_Error
Move the specified message from the current folder into a new folder.
save()  : bool
Save an object.
storageIdExists()  : bool
Test if the storage ID exists.
synchronize()  : null
Synchronize the data cache for the current folder.
_updateHistory()  : null
Update the Horde history in case an element was modified outside of Horde.

Properties

$_cache

The data cache.

private Kolab_Cache $_cache

$_cache_cyrus_optimize

Do we optimize for cyrus IMAPD?

private bool $_cache_cyrus_optimize = \true

$_cache_key

The Id of this data object in the cache.

private string $_cache_key

$_data_version

The version of the data.

private int $_data_version

$_folder

The link to the parent folder object.

private Kolab_Folder $_folder

$_object_type

The object type of the data.

private string $_object_type

$_type

The folder type.

private string $_type

$_type_key

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

private string $_type_key

Methods

__construct()

Creates a Kolab Folder Data representation.

public __construct(string $folder, string $type, Horde_Kolab_Storage_Driver $driver, Horde_Kolab_Storage_Factory $factory[, string $object_type = null ][, int $data_version = 1 ]) : mixed
Parameters
$folder : string

Name/ID of the folder.

$type : string

Type of the folder.

$driver : Horde_Kolab_Storage_Driver

The primary connection driver.

$factory : Horde_Kolab_Storage_Factory

The factory.

$object_type : string = null

Type of the objects we want to read.

$data_version : int = 1

Format version of the object data.

Return values
mixed

delete()

Delete the specified message from this folder.

public delete(string $object_uid) : bool|PEAR_Error
Parameters
$object_uid : string

Id of the message to be deleted.

Return values
bool|PEAR_Error

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

deleteAll()

Delete all messages from the current folder.

public deleteAll() : bool|PEAR_Error
Return values
bool|PEAR_Error

True if successful.

generateUID()

Generate a unique object id.

public generateUID() : string
Return values
string

The unique id.

getAttachment()

Return the specified attachment.

public getAttachment(string $attachment_id) : string|PEAR_Error
Parameters
$attachment_id : string

The attachment id.

Return values
string|PEAR_Error

The attachment data as a string.

getObjectArray()

Retrieve all objects in the current folder as an array.

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

The object data array.

move()

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

public move(string $object_uid, string $new_share) : bool|PEAR_Error
Parameters
$object_uid : string

ID of the message to be deleted.

$new_share : string

ID of the target share.

Return values
bool|PEAR_Error

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

save()

Save an object.

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

The array that holds the data object.

$old_object_id : string = null

The id of the object if it existed before.

Tags
throws
Horde_Kolab_Storage_Exception

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

Return values
bool

True on success.

storageIdExists()

Test if the storage ID exists.

public storageIdExists(int $uid) : bool
Parameters
$uid : int

The storage ID.

Return values
bool

True if the ID exists.

synchronize()

Synchronize the data cache for the current folder.

public synchronize([string $history_ignore = null ]) : null
Parameters
$history_ignore : string = null

Object uid that should not be updated in the History

Return values
null

_updateHistory()

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

private _updateHistory(string $object_uid, int $mod_ts, string $action) : null
Parameters
$object_uid : string

Object uid that should be updated.

$mod_ts : int

Timestamp of the modification.

$action : string

The action that was performed.

Return values
null

Search results