PHP Class Horde_Kolab_Storage_Data_Old, horde

Copyright 2009-2016 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.
Author: Stuart Binge ([email protected])
Author: Thomas Jarosch ([email protected])
Author: Gunnar Wrobel ([email protected])
Mostrar archivo Open project: horde/horde

Public Methods

Method Description
__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.
delete ( string $object_uid ) : boolean | PEAR_Error Delete the specified message from this folder.
deleteAll ( ) : boolean | PEAR_Error Delete all messages from the current folder.
generateUID ( ) : string Generate a unique object id.
getAttachment ( string $attachment_id ) : string | PEAR_Error Return the specified attachment.
getObjectArray ( ) : array Retrieve all objects in the current folder as an array.
move ( string $object_uid, string $new_share ) : boolean | PEAR_Error Move the specified message from the current folder into a new folder.
save ( array $object, string $old_object_id = null ) : boolean Save an object.
storageIdExists ( integer $uid ) : boolean Test if the storage ID exists.
synchronize ( string $history_ignore = null ) : null Synchronize the data cache for the current folder.

Private Methods

Method Description
_updateHistory ( string $object_uid, integer $mod_ts, string $action ) : null Update the Horde history in case an element was modified outside of Horde.

Method Details

__construct() public method

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, integer $data_version = 1 )
$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 Type of the objects we want to read.
$data_version integer Format version of the object data.

delete() public method

Delete the specified message from this folder.
public delete ( string $object_uid ) : boolean | PEAR_Error
$object_uid string Id of the message to be deleted.
return boolean | PEAR_Error True is successful, false if the message does not exist.

deleteAll() public method

Delete all messages from the current folder.
public deleteAll ( ) : boolean | PEAR_Error
return boolean | PEAR_Error True if successful.

generateUID() public method

Generate a unique object id.
public generateUID ( ) : string
return string The unique id.

getAttachment() public method

Return the specified attachment.
public getAttachment ( string $attachment_id ) : string | PEAR_Error
$attachment_id string The attachment id.
return string | PEAR_Error The attachment data as a string.

getObjectArray() public method

Retrieve all objects in the current folder as an array.
public getObjectArray ( ) : array
return array The object data array.

move() public method

Move the specified message from the current folder into a new folder.
public move ( string $object_uid, string $new_share ) : boolean | PEAR_Error
$object_uid string ID of the message to be deleted.
$new_share string ID of the target share.
return boolean | PEAR_Error True is successful, false if the object does not exist.

save() public method

Save an object.
public save ( array $object, string $old_object_id = null ) : boolean
$object array The array that holds the data object.
$old_object_id string The id of the object if it existed before.
return boolean True on success.

storageIdExists() public method

Test if the storage ID exists.
public storageIdExists ( integer $uid ) : boolean
$uid integer The storage ID.
return boolean True if the ID exists.

synchronize() public method

Synchronize the data cache for the current folder.
public synchronize ( string $history_ignore = null ) : null
$history_ignore string Object uid that should not be updated in the History
return null