Class Kolab_Data

Description

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

$Horde: framework/Kolab_Storage/lib/Horde/Kolab/Storage/Data.php,v 1.5.2.4 2009/01/06 15:23:18 jan Exp $

Copyright 2004-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Kolab_Storage/lib/Horde/Kolab/Storage/Data.php (line 27)


	
			
Variable Summary
Method Summary
 Kolab_Data Kolab_Data (string $type, [string $object_type = null], [int $data_version = 1])
 boolean|PEAR_Error delete (string $object_uid)
 boolean|PEAR_Error deleteAll ()
 string generateUID ()
 string|PEAR_Error getAttachment (string $attachment_id)
 array|PEAR_Error getObject (string $object_id)
 array getObjectArray ()
 array getObjectIds ()
 array getObjects ()
 boolean|PEAR_Error move (string $object_uid, string $new_share)
 boolean objectUidExists (string $uid)
 boolean|PEAR_Error save (array $object, [string $old_object_id = null])
 void setFolder ( &$folder, Kolab_Folder $folder)
 void synchronize ([string $history_ignore = null])
 mixed _folderChanged (string $validity, string $nextid,  &$old_ids,  &$new_ids, array $old_ids, array $new_ids)
 string _getCacheKey ()
 int _getStorageId ( $object_uid, string $object_id)
 boolean _storageIdExists (int $uid)
 void _updateHistory (string $object_uid, int $mod_ts, string $action)
 array __sleep ()
 void __wakeup ()
Variables
Kolab_Cache $_cache (line 62)

The data cache.

boolean $_cache_cyrus_optimize = true (line 84)

Do we optimize for cyrus IMAPD?

string $_cache_key (line 69)

The Id of this data object in the cache.

int $_data_version (line 55)

The version of the data.

Kolab_Folder $_folder (line 34)

The link to the folder object.

string $_object_type (line 48)

The object type of the data.

string $_type (line 41)

The folder type.

string $_type_key (line 77)

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

Methods
Constructor Kolab_Data (line 93)

Creates a Kolab Folder Data representation.

Kolab_Data Kolab_Data (string $type, [string $object_type = null], [int $data_version = 1])
  • string $type: Type of the folder.
  • string $object_type: Type of the objects we want to read.
  • int $data_version: Format version of the object data.
delete (line 176)

Delete the specified message from this folder.

  • return: True is successful, false if the message does not exist.
boolean|PEAR_Error delete (string $object_uid)
  • string $object_uid: Id of the message to be deleted.
deleteAll (line 206)

Delete all messages from the current folder.

  • return: True if successful.
boolean|PEAR_Error deleteAll ()
generateUID (line 559)

Generate a unique object id.

  • return: The unique id.
string generateUID ()
getAttachment (line 606)

Return the specified attachment.

  • return: The attachment data as a string.
string|PEAR_Error getAttachment (string $attachment_id)
  • string $attachment_id: The attachment id.
getObject (line 589)

Return the specified object.

  • return: The object data as an array.
array|PEAR_Error getObject (string $object_id)
  • string $object_id: The object id.
getObjectArray (line 640)

Retrieve all objects in the current folder as an array.

  • return: The object data array.
array getObjectArray ()
getObjectIds (line 616)

Retrieve all object ids in the current folder.

  • return: The object ids.
array getObjectIds ()
getObjects (line 628)

Retrieve all objects in the current folder.

  • return: All object data arrays.
array getObjects ()
move (line 244)

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

  • return: True is successful, false if the object does not exist.
boolean|PEAR_Error move (string $object_uid, string $new_share)
  • string $object_uid: ID of the message to be deleted.
  • string $new_share: ID of the target share.
objectUidExists (line 575)

Check if the given id exists.

  • return: True if the id was found, false otherwise.
boolean objectUidExists (string $uid)
  • string $uid: The object id.
save (line 277)

Save an object.

  • return: True on success.
boolean|PEAR_Error save (array $object, [string $old_object_id = null])
  • array $object: The array that holds the data object.
  • string $old_object_id: The id of the object if it existed before.
setFolder (line 137)

Set the folder handler.

void setFolder ( &$folder, Kolab_Folder $folder)
  • Kolab_Folder $folder: The handler for the folder of folders.
  • &$folder
synchronize (line 319)

Synchronize the data cache for the current folder.

void synchronize ([string $history_ignore = null])
  • string $history_ignore: Object uid that should not be updated in the History
_folderChanged (line 475)

Check if the folder has changed and the cache needs to be updated.

  • return: True or an array of deleted IDs if the folder changed and false otherwise.
mixed _folderChanged (string $validity, string $nextid,  &$old_ids,  &$new_ids, array $old_ids, array $new_ids)
  • string $validity: ID validity of the folder.
  • string $nextid: next ID for the folder.
  • array $old_ids: Old list of IDs in the folder.
  • array $new_ids: New list of IDs in the folder.
  • &$old_ids
  • &$new_ids
_getCacheKey (line 148)

Return a unique key for the current folder.

  • return: A key that represents the current folder.
string _getCacheKey ()
_getStorageId (line 528)

Return the IMAP ID for the given object ID.

  • return: The IMAP ID.
int _getStorageId ( $object_uid, string $object_id)
  • string $object_id: The object ID.
  • $object_uid
_storageIdExists (line 547)

Test if the storage ID exists.

  • return: True if the ID exists.
boolean _storageIdExists (int $uid)
  • int $uid: The storage ID.
_updateHistory (line 439)

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

void _updateHistory (string $object_uid, int $mod_ts, string $action)
  • string $object_uid: Object uid that should be updated.
  • int $mod_ts: Timestamp of the modification.
  • string $action: The action that was performed.
__sleep (line 124)

Returns the properties that need to be serialized.

  • return: List of serializable properties.
array __sleep ()
__wakeup (line 114)

Initializes the object.

void __wakeup ()

Documentation generated on Sun, 30 Jan 2011 05:16:22 +0000 by phpDocumentor 1.4.3