Class Kolab

Description

The Horde_Kolab library is both an object used by application drivers to communicate with a Kolab server, as well as a utility library providing several functions to help in the IMAP folder <-> Horde Share synchronisation process.

$Horde: framework/Kolab/Kolab.php,v 1.26.10.32 2009/01/06 15:23:13 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/Kolab.php (line 28)


	
			
Variable Summary
 int $version
 string $_app
 string $_uid
 DomDocument $_xml
Method Summary
 Kolab Kolab ([ $app = null])
 void &appendElem ( $name,  &$parent)
 void &appendRootElem ( $name)
 void booleanToPercentage ( $boolean)
 void close ()
 integer decodeDate (string $date)
 integer decodeDateOrDateTime (string $date)
 integer decodeDateTime (string $datetime)
 integer decodeFullDayDate (string $date)
 string decodeImapFolderName (string $name)
 void delAllElems ( $name,  &$parent)
 void delAllRootElems ( $name)
 void delElem ( $name,  &$parent)
 void delRootElem ( &$element)
 string encodeDate ([ $date = false])
 string encodeDateTime ([ $datetime = false])
 string encodeImapFolderName (string $name)
 mixed findObject (string $uid)
 mixed findObjects (string $criteria)
 void &getAllElems ( $name,  &$parent)
 void &getAllRootElems ( $name)
 mixed getAppConsts (string $app)
 void &getElem ( $name,  &$parent)
 void getElemStr ( &$parent,  $name, [ $default = ''])
 void getElemVal ( &$parent,  $name, [ $default = 0])
 mixed getMailboxType (object $mailbox)
 string getMimeType ()
 array getObjects ()
 void &getRootElem ( $name)
 string getServer ( $server_type)
 void getStr ( $name, [ $default = ''])
 string getUID ()
 void getVal ( $name, [ $default = 0])
 void &initElem ( $name,  &$parent)
 void &initRootElem ( $name)
 array listFolders ()
 mixed listObjects ()
 mixed listObjectsInFolder (string $folder)
 mixed &loadObject (string $uid, [boolean $is_msgno = false])
 mixed moveObject (string $uid, boolean $new_share)
 mixed &newObject (string $uid)
 mixed open (string $share_uid, [int $loader = 0])
 void percentageToBoolean ( $percentage)
 mixed removeAllObjects ()
 mixed removeObjects (string $objects, [boolean $is_msgno = false])
 mixed saveObject ()
 void &setElemStr ( &$parent,  $name, [ $value = ''])
 void &setElemVal ( &$parent,  $name, [ $value = ''])
 void &setStr ( $name, [ $value = ''])
 void &setVal ( $name, [ $value = ''])
 string unfoldText (string $text)
 string unixNewlines (string $text)
Variables
int $version = 2 (line 55)

Indicates the version of this driver

  • deprecated:
string $_app (line 37)

The current application that this Kolab object instance is catering to.

  • deprecated:
Kolab_Storage $_storage (line 46)

The storage driver for the Kolab server.

  • deprecated:
string $_uid (line 75)

The (Kolab) UID of the current message.

  • deprecated:
DomDocument $_xml (line 66)

The DomDocument object that contains the XML DOM tree of the currently loaded groupware object. We cache this here to ensure preservation of unknown fields when re-saving the object.

  • deprecated:
Methods
Constructor Kolab (line 82)
  • deprecated:
Kolab Kolab ([ $app = null])
  • $app
appendElem (line 509)
void &appendElem ( $name,  &$parent)
  • $name
  • &$parent
appendRootElem (line 515)
void &appendRootElem ( $name)
  • $name
booleanToPercentage (line 705)
void booleanToPercentage ( $boolean)
  • $boolean
close (line 133)

Close the current share.

  • deprecated:
void close ()
decodeDate (line 628)

Returns a UNIX timestamp corresponding the given date string which is in the format prescribed by the Kolab Format Specification.

  • return: The unix timestamp corresponding to $date.
  • deprecated:
integer decodeDate (string $date)
  • string $date: The string representation of the date.
decodeDateOrDateTime (line 674)

Returns a UNIX timestamp corresponding the given date or date-time string which is in either format prescribed by the Kolab Format Specification.

  • return: The unix timestamp corresponding to $date.
  • deprecated:
integer decodeDateOrDateTime (string $date)
  • string $date: The string representation of the date (& time).
decodeDateTime (line 658)

Returns a UNIX timestamp corresponding the given date-time string which is in the format prescribed by the Kolab Format Specification.

  • return: The unix timestamp corresponding to $datetime.
  • deprecated:
integer decodeDateTime (string $datetime)
  • string $datetime: The string representation of the date & time.
decodeFullDayDate (line 689)

Returns a UNIX timestamp corresponding the given date-time string which is in the format prescribed by the Kolab Format Specification.

  • return: The unix timestamp corresponding to $datetime.
  • deprecated:
integer decodeFullDayDate (string $date)
  • string $date: The string representation of the date (& time).
decodeImapFolderName (line 571)

Converts a string in the IMAP variation of UTF-7 into a string in the current character set.

  • return: encoded in the current character set.
  • deprecated:
string decodeImapFolderName (string $name)
  • string $name: The text in IMAP UTF-7 to convert.
delAllElems (line 417)
void delAllElems ( $name,  &$parent)
  • $name
  • &$parent
delAllRootElems (line 426)
void delAllRootElems ( $name)
  • $name
delElem (line 407)
void delElem ( $name,  &$parent)
  • $name
  • &$parent
delRootElem (line 431)
void delRootElem ( &$element)
  • &$element
encodeDate (line 613)

Returns a string containing the current UTC date in the format prescribed by the Kolab Format Specification.

  • return: The current UTC date in the format 'YYYY-MM-DD'.
  • deprecated:
string encodeDate ([ $date = false])
  • $date
encodeDateTime (line 643)

Returns a string containing the current UTC date and time in the format prescribed by the Kolab Format Specification.

  • return: The current UTC date and time in the format 'YYYY-MM-DDThh:mm:ssZ', where the T and Z are literal characters.
  • deprecated:
string encodeDateTime ([ $datetime = false])
  • $datetime
encodeImapFolderName (line 556)

Converts a string in the current character set to an IMAP UTF-7 string, suitable for use as the name of an IMAP folder.

  • return: encoded in the IMAP variation of UTF-7.
  • deprecated:
string encodeImapFolderName (string $name)
  • string $name: The text in the current character set to convert.
findObject (line 201)

Find the object with the given UID in the current share.

  • return: false if there is no such object
  • deprecated:
mixed findObject (string $uid)
  • string $uid: The UID of the object.
findObjects (line 353)

Find the object using the given criteria in the current share.

  • return: false if no object can be found
  • deprecated:
mixed findObjects (string $criteria)
  • string $criteria: The search criteria.
getAllElems (line 389)
void &getAllElems ( $name,  &$parent)
  • $name
  • &$parent
getAllRootElems (line 401)
void &getAllRootElems ( $name)
  • $name
getAppConsts (line 722)

Returns an array of application-specific constants, that are used in a generic manner throughout the library.

  • return: An array of application-specific constants if $app is a supported application, or a PEAR_Error object if $app is not supported.
  • deprecated:
mixed getAppConsts (string $app)
  • string $app: The application whose constants to query.
getCurrentObject (line 371)
void &getCurrentObject ()
getElem (line 377)
void &getElem ( $name,  &$parent)
  • $name
  • &$parent
getElemStr (line 455)
void getElemStr ( &$parent,  $name, [ $default = ''])
  • &$parent
  • $name
  • $default
getElemVal (line 441)
void getElemVal ( &$parent,  $name, [ $default = 0])
  • &$parent
  • $name
  • $default
getMailboxType (line 334)

Returns the groupware type of the given IMAP folder.

  • return: A string indicating the groupware type of $mailbox or boolean "false" on error.
  • deprecated:
mixed getMailboxType (object $mailbox)
  • object $mailbox: The mailbox of interest.
getMimeType (line 366)

Return the MIME type of the message we are currently dealing with.

  • return: The MIME type of the message we are currently dealing with.
  • deprecated:
string getMimeType ()
getObjects (line 145)

Retrieve all objects in the current folder

  • return: All object data arrays
  • deprecated:
array getObjects ()
getRootElem (line 395)
void &getRootElem ( $name)
  • $name
getServer (line 793)

Returns the server url of the given type.

This method is used to encapsulate multidomain support.

  • return: The server url or empty on error.
string getServer ( $server_type)
  • $server_type
getStr (line 475)
void getStr ( $name, [ $default = ''])
  • $name
  • $default
getUID (line 101)

Return the uid of the message we are currently dealing with.

  • return: The Kolab UID of the message we are currently dealing with.
  • deprecated:
string getUID ()
getVal (line 469)
void getVal ( $name, [ $default = 0])
  • $name
  • $default
initElem (line 481)
void &initElem ( $name,  &$parent)
  • $name
  • &$parent
initRootElem (line 503)
void &initRootElem ( $name)
  • $name
listFolders (line 159)

Returns a list of all IMAP folders (including their groupware type) that the current user has acccess to.

  • return: An array of array($foldername, $foldertype) items (empty on error).
  • deprecated:
array listFolders ()
listObjects (line 172)

List the objects in the current share.

  • return: false if there are no objects, a list of message ids or a PEAR error.
  • deprecated:
mixed listObjects ()
listObjectsInFolder (line 187)

List the objects in the specified folder.

  • return: false if there are no objects, a list of message ids otherwise.
  • deprecated:
mixed listObjectsInFolder (string $folder)
  • string $folder: The folder to search.
loadObject (line 219)

Load the object with the given UID into $this->_xml

  • return: false if there is no such object, a PEAR error if the object could not be loaded. Otherwise the xml document will be returned
  • deprecated:
mixed &loadObject (string $uid, [boolean $is_msgno = false])
  • string $uid: The UID of the object.
  • boolean $is_msgno: Indicate if $uid holds an IMAP message number
moveObject (line 286)

Move the object with the given UID from the current share into the specified new share.

  • return: false if there is no current share, a PEAR error if the object could not be moved. True otherwise.
  • deprecated:
mixed moveObject (string $uid, boolean $new_share)
  • string $uid: The UID of the object.
  • boolean $new_share: The share the object should be moved to.
newObject (line 244)

Create the object with UID in the current share

  • return: false if there is no open share, a PEAR error if the object could not be created. Otherwise the xml document will be returned
  • deprecated:
mixed &newObject (string $uid)
  • string $uid: The UID of the object.
open (line 118)

Open the specified share.

  • return: True on success, a PEAR error otherwise
  • deprecated:
mixed open (string $share_uid, [int $loader = 0])
  • string $share_uid: The uid of the share that should be opened.
  • int $loader: The version of the XML loader
percentageToBoolean (line 700)
void percentageToBoolean ( $percentage)
  • $percentage
removeAllObjects (line 319)

Remove all objects from the current share.

  • return: false if there is no IMAP connection, a PEAR error if the objects could not be removed. True if the call succeeded.
  • deprecated:
mixed removeAllObjects ()
removeObjects (line 305)

Remove the specified objects from the current share.

  • return: false if there is no IMAP connection, a PEAR error if the objects could not be removed. True if the call succeeded.
  • deprecated:
mixed removeObjects (string $objects, [boolean $is_msgno = false])
  • string $objects: The UIDs (or maessage numbers) of the objects to be deleted.
  • boolean $is_msgno: Indicate if $objects holds IMAP message numbers
saveObject (line 266)

Save the current object.

  • return: false if there is no open share, a PEAR error if the object could not be saved. True otherwise
  • deprecated:
mixed saveObject ()
setElemStr (line 529)
void &setElemStr ( &$parent,  $name, [ $value = ''])
  • &$parent
  • $name
  • $value
setElemVal (line 521)
void &setElemVal ( &$parent,  $name, [ $value = ''])
  • &$parent
  • $name
  • $value
setStr (line 540)
void &setStr ( $name, [ $value = ''])
  • $name
  • $value
setVal (line 534)
void &setVal ( $name, [ $value = ''])
  • $name
  • $value
triggerFreeBusyUpdate (line 812)
  • deprecated:
void triggerFreeBusyUpdate ()
unfoldText (line 600)

Returns the unfolded representation of the given text.

  • return: The unfolded representation of $text.
  • deprecated:
string unfoldText (string $text)
  • string $text: The text to unfold.
unixNewlines (line 586)

Converts all newlines (in DOS, MAC & UNIX format) in the specified text to unix-style (LF) format.

  • return: with all newlines replaced by LF.
  • deprecated:
string unixNewlines (string $text)
  • string $text: The text to convert.

Documentation generated on Sun, 30 Jan 2011 05:18:52 +0000 by phpDocumentor 1.4.3