Class Horde_Kolab_Format_XML

Description

Kolab XML to array hash converter.

For implementing a new format type you will have to inherit this class and provide a _load/_save function.

$Horde: framework/Kolab_Format/lib/Horde/Kolab/Format/XML.php,v 1.5.2.13 2011-01-11 20:21:01 wrobel Exp $

Copyright 2007-2008 Klarälvdalens Datakonsult AB

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.

Located in /Kolab_Format/lib/Horde/Kolab/Format/XML.php (line 110)


	
			
Direct descendents
Class Description
 class Horde_Kolab_Format_XML_string Kolab XML handler for a string value
 class Horde_Kolab_Format_XML_annotation Kolab XML handler for IMAP folder annotations.
 class Horde_Kolab_Format_XML_contact Kolab XML handler for contact groupware objects
 class Horde_Kolab_Format_XML_distributionlist Kolab XML handler for distributionlist groupware objects
 class Horde_Kolab_Format_XML_event Kolab XML handler for event groupware objects.
 class Horde_Kolab_Format_XML_hprefs Kolab XML handler for client preferences.
 class Horde_Kolab_Format_XML_note Kolab XML handler for note groupware objects.
 class Horde_Kolab_Format_XML_task Kolab XML handler for task groupware objects.
 class Horde_Kolab_Format_XML_dummy A dummy XML type
Variable Summary
Method Summary
 Horde_Kolab_Format_XML Horde_Kolab_Format_XML ([array $params = null])
 Horde_Kolab_Format_XML|PEAR_Error &factory ([string $object_type = ''], [array $params = null])
 string getDisposition ()
 string getMimeType ()
 string getName ()
 array|PEAR_Error load ( &$xmltext, string $xmltext)
 string|PEAR_Error save ( $object, array $attributes)
 array|PEAR_Error _load ( &$children, array $children)
 boolean|PEAR_Error _save (array $root, array $object)
Variables
boolean $_create_categories = true (line 159)

Automatically create categories if they are missing?


Redefined in descendants as:
array $_fields_attendee = array(
'type' => HORDE_KOLAB_XML_TYPE_MULTIPLE,
'value' => HORDE_KOLAB_XML_VALUE_DEFAULT,
'default' => array(),'array'=>array('type'=>HORDE_KOLAB_XML_TYPE_COMPOSITE,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,'array'=>array('display-name'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_DEFAULT,'default'=>'',),'smtp-address'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_DEFAULT,'default'=>'',),'status'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_DEFAULT,'default'=>'none',),'request-response'=>array('type'=>HORDE_KOLAB_XML_TYPE_BOOLEAN,'value'=>HORDE_KOLAB_XML_VALUE_DEFAULT,'default'=>true,),'role'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_DEFAULT,'default'=>'required',),),),)
(line 193)

Fields for an attendee

array $_fields_basic (line 152)

Basic fields in any Kolab object

array $_fields_recurrence = array(
// Attribute on root node: cycle
// Attribute on root node: type
'interval' => array(
'type' => HORDE_KOLAB_XML_TYPE_INTEGER,
'value' => HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,
),'day'=>array('type'=>HORDE_KOLAB_XML_TYPE_MULTIPLE,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,'array'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,),),'daynumber'=>array('type'=>HORDE_KOLAB_XML_TYPE_INTEGER,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,),'month'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,),// Attribute on range: type
'range'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_DEFAULT,'default'=>'',),'exclusion'=>array('type'=>HORDE_KOLAB_XML_TYPE_MULTIPLE,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,'array'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,),),'complete'=>array('type'=>HORDE_KOLAB_XML_TYPE_MULTIPLE,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,'array'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,),),)
(line 235)

Fields for a recurrence

array $_fields_simple_person = array(
'type' => HORDE_KOLAB_XML_TYPE_COMPOSITE,
'value' => HORDE_KOLAB_XML_VALUE_MAYBE_MISSING,
'array' => array(
'display-name' => array(
'type' => HORDE_KOLAB_XML_TYPE_STRING,
'value' => HORDE_KOLAB_XML_VALUE_DEFAULT,
'default' => '',
),'smtp-address'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_DEFAULT,'default'=>'',),'uid'=>array('type'=>HORDE_KOLAB_XML_TYPE_STRING,'value'=>HORDE_KOLAB_XML_VALUE_DEFAULT,'default'=>'',),),)
(line 166)

Fields for a simple person

string $_name = 'kolab.xml' (line 124)

The name of the resulting document.

string $_root_name = 'kolab' (line 138)

The name of the root element.

string $_root_version = '1.0' (line 145)

Kolab format version of the root element.

int $_version = 1 (line 117)

Requested version of the data array to return

Horde_DOM_Document $_xmldoc = null (line 131)

The XML document this driver works with.

Methods
Constructor Horde_Kolab_Format_XML (line 287)

Constructor

Horde_Kolab_Format_XML Horde_Kolab_Format_XML ([array $params = null])
  • array $params: Any additional options
factory (line 364)

Attempts to return a concrete Horde_Kolab_Format_XML instance.

based on $object_type.

  • return: The newly created concrete Horde_Kolab_Format_XML instance.
Horde_Kolab_Format_XML|PEAR_Error &factory ([string $object_type = ''], [array $params = null])
  • string $object_type: The object type that should be handled.
  • array $params: Any additional parameters.
getDisposition (line 404)

Return the disposition of the resulting document.

  • return: The disportion of this document.
string getDisposition ()
getMimeType (line 394)

Return the mime type of the resulting document.

  • return: The mime type of the result.
string getMimeType ()
getName (line 384)

Return the name of the resulting document.

  • return: The name that may be used as filename.
string getName ()
load (line 419)

Load an object based on the given XML string.

  • return: The data array representing the object.
  • todo: Check encoding of the returned array. It seems to be ISO-8859-1 at the moment and UTF-8 would seem more appropriate.
array|PEAR_Error load ( &$xmltext, string $xmltext)
  • string $xmltext: The XML of the message as string.
  • &$xmltext

Redefined in descendants as:
save (line 618)

Convert the data to a XML string.

  • return: The data as XML string.
string|PEAR_Error save ( $object, array $attributes)
  • array $attributes: The data array representing the note.
  • $object

Redefined in descendants as:
_load (line 483)

Load the groupware object based on the specifc XML values.

  • return: The data array representing the object.
  • access: protected
array|PEAR_Error _load ( &$children, array $children)
  • array $children: An array of XML nodes.
  • &$children

Redefined in descendants as:
_save (line 646)

Save the specific XML values.

  • return: True on success.
  • access: protected
boolean|PEAR_Error _save (array $root, array $object)
  • array $root: The XML document root.
  • array $object: The resulting data array.

Redefined in descendants as:

Documentation generated on Sun, 30 Jan 2011 05:23:31 +0000 by phpDocumentor 1.4.3