Horde_Kolab_Format_Xml_Task
extends Horde_Kolab_Format_Xml
in package
Kolab XML handler for task groupware objects.
Copyright 2007-2009 Klarälvdalens Datakonsult AB Copyright 2011-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
Table of Contents
- PRODUCT_ID = __CLASS__
- Defines a XML value that should get a default value if missing
- TYPE_BOOLEAN = 'Horde_Kolab_Format_Xml_Type_Boolean'
- Defines a XML value as boolean type
- TYPE_COLOR = 'Horde_Kolab_Format_Xml_Type_Color'
- Defines a XML value as color type
- TYPE_COMPOSITE = 'Horde_Kolab_Format_Xml_Type_Composite'
- Defines a XML value as composite value type
- TYPE_DATE = 'Horde_Kolab_Format_Xml_Type_Date'
- Defines a XML value as date type
- TYPE_DATE_OR_DATETIME = 'Horde_Kolab_Format_Xml_Type_DateTime'
- Defines a XML value as date or datetime type
- TYPE_DATETIME = 'Horde_Kolab_Format_Xml_Type_DateTime'
- Defines a XML value as datetime type
- TYPE_INTEGER = 'Horde_Kolab_Format_Xml_Type_Integer'
- Defines a XML value as integer type
- TYPE_MULTIPLE = 'Horde_Kolab_Format_Xml_Type_Multiple'
- Defines a XML value as array type
- TYPE_ROOT = 'Horde_Kolab_Format_Xml_Type_Root'
- Represents the Kolab format root node
- TYPE_STRING = 'Horde_Kolab_Format_Xml_Type_String'
- Defines a XML value as string type
- TYPE_XML = 'Horde_Kolab_Format_Xml_Type_XmlAppend'
- Defines a XML value as raw XML
- VALUE_CALCULATED = 3
- Defines a XML value that will be calculated by its own function
- VALUE_DEFAULT = 0
- Defines a XML value that should get a default value if missing
- VALUE_MAYBE_MISSING = 1
- Defines a XML value that may be missing
- VALUE_NOT_EMPTY = 2
- Defines a XML value that may not be missing
- $_factory : Horde_Kolab_Format_Factory
- The factory for additional objects.
- $_fields_specific : Kolab
- Specific data fields for the prefs object
- $_parser : Horde_Kolab_Format_Xml_Parser
- The parser dealing with the input.
- $_root_name : string
- The name of the root element.
- $_root_version : string
- Kolab format version of the root element.
- $_version : int
- Requested version of the data array to return
- $_xmldoc : DOMDocument
- The XML document this driver works with.
- __construct() : mixed
- Constructor
- getVersion() : int
- Return the API version of the data structures that are being used for in- and output.
- load() : array<string|int, mixed>
- Load an object based on the given XML stream. The stream may only contain UTF-8 data.
- save() : string
- Convert the data to a XML stream. Strings contained in the data array may only be provided as UTF-8 data.
- _getParameters() : array<string|int, mixed>
- Generate the internal parameter list for this operation.
- _getParser() : Horde_Kolab_Format_Xml_Parser
- Fetch the XML parser.
- _getRoot() : Horde_Kolab_Xml_Type_Root
- Return the root handler.
- _refreshParser() : null
- Throw the parser instance away.
Constants
PRODUCT_ID
Defines a XML value that should get a default value if missing
public
mixed
PRODUCT_ID
= __CLASS__
TYPE_BOOLEAN
Defines a XML value as boolean type
public
mixed
TYPE_BOOLEAN
= 'Horde_Kolab_Format_Xml_Type_Boolean'
TYPE_COLOR
Defines a XML value as color type
public
mixed
TYPE_COLOR
= 'Horde_Kolab_Format_Xml_Type_Color'
TYPE_COMPOSITE
Defines a XML value as composite value type
public
mixed
TYPE_COMPOSITE
= 'Horde_Kolab_Format_Xml_Type_Composite'
TYPE_DATE
Defines a XML value as date type
public
mixed
TYPE_DATE
= 'Horde_Kolab_Format_Xml_Type_Date'
TYPE_DATE_OR_DATETIME
Defines a XML value as date or datetime type
public
mixed
TYPE_DATE_OR_DATETIME
= 'Horde_Kolab_Format_Xml_Type_DateTime'
TYPE_DATETIME
Defines a XML value as datetime type
public
mixed
TYPE_DATETIME
= 'Horde_Kolab_Format_Xml_Type_DateTime'
TYPE_INTEGER
Defines a XML value as integer type
public
mixed
TYPE_INTEGER
= 'Horde_Kolab_Format_Xml_Type_Integer'
TYPE_MULTIPLE
Defines a XML value as array type
public
mixed
TYPE_MULTIPLE
= 'Horde_Kolab_Format_Xml_Type_Multiple'
TYPE_ROOT
Represents the Kolab format root node
public
mixed
TYPE_ROOT
= 'Horde_Kolab_Format_Xml_Type_Root'
TYPE_STRING
Defines a XML value as string type
public
mixed
TYPE_STRING
= 'Horde_Kolab_Format_Xml_Type_String'
TYPE_XML
Defines a XML value as raw XML
public
mixed
TYPE_XML
= 'Horde_Kolab_Format_Xml_Type_XmlAppend'
VALUE_CALCULATED
Defines a XML value that will be calculated by its own function
public
mixed
VALUE_CALCULATED
= 3
VALUE_DEFAULT
Defines a XML value that should get a default value if missing
public
mixed
VALUE_DEFAULT
= 0
VALUE_MAYBE_MISSING
Defines a XML value that may be missing
public
mixed
VALUE_MAYBE_MISSING
= 1
VALUE_NOT_EMPTY
Defines a XML value that may not be missing
public
mixed
VALUE_NOT_EMPTY
= 2
Properties
$_factory
The factory for additional objects.
protected
Horde_Kolab_Format_Factory
$_factory
$_fields_specific
Specific data fields for the prefs object
protected
Kolab
$_fields_specific
= array('summary' => 'Horde_Kolab_Format_Xml_Type_String_MaybeMissing', 'location' => 'Horde_Kolab_Format_Xml_Type_String_MaybeMissing', 'organizer' => 'Horde_Kolab_Format_Xml_Type_Composite_SimplePerson', 'start-date' => 'Horde_Kolab_Format_Xml_Type_DateTime', 'alarm' => 'Horde_Kolab_Format_Xml_Type_Integer', 'recurrence' => 'Horde_Kolab_Format_Xml_Type_Composite_Recurrence', 'attendee' => 'Horde_Kolab_Format_Xml_Type_Multiple_Attendee', 'priority' => 'Horde_Kolab_Format_Xml_Type_TaskPriority', 'completed' => 'Horde_Kolab_Format_Xml_Type_TaskCompletion', 'status' => 'Horde_Kolab_Format_Xml_Type_TaskStatus', 'due-date' => 'Horde_Kolab_Format_Xml_Type_DateTime', 'parent' => 'Horde_Kolab_Format_Xml_Type_String_MaybeMissing', 'horde-estimate' => 'Horde_Kolab_Format_Xml_Type_String_MaybeMissing', 'horde-alarm-methods' => 'Horde_Kolab_Format_Xml_Type_String_MaybeMissing')
$_parser
The parser dealing with the input.
protected
Horde_Kolab_Format_Xml_Parser
$_parser
$_root_name
The name of the root element.
protected
string
$_root_name
= 'task'
$_root_version
Kolab format version of the root element.
protected
string
$_root_version
= '1.0'
$_version
Requested version of the data array to return
protected
int
$_version
= 2
$_xmldoc
The XML document this driver works with.
protected
DOMDocument
$_xmldoc
= \null
Methods
__construct()
Constructor
public
__construct(Horde_Kolab_Format_Xml_Parser $parser, Horde_Kolab_Format_Factory $factory[, array<string|int, mixed> $params = null ]) : mixed
Parameters
- $parser : Horde_Kolab_Format_Xml_Parser
-
The XML parser.
- $factory : Horde_Kolab_Format_Factory
-
The factory for helper objects.
- $params : array<string|int, mixed> = null
-
Any additional options.
Return values
mixed —getVersion()
Return the API version of the data structures that are being used for in- and output.
public
getVersion() : int
Return values
int —The version number;
load()
Load an object based on the given XML stream. The stream may only contain UTF-8 data.
public
load(resource $xml[, array<string|int, mixed> $options = array() ]) : array<string|int, mixed>
Parameters
- $xml : resource
-
The XML stream of the message.
- $options : array<string|int, mixed> = array()
-
Additional options when parsing the XML.
- relaxed: Relaxed error checking (default: false)
Tags
Return values
array<string|int, mixed> —The data array representing the object.
save()
Convert the data to a XML stream. Strings contained in the data array may only be provided as UTF-8 data.
public
save(array<string|int, mixed> $object[, array<string|int, mixed> $options = array() ]) : string
Parameters
- $object : array<string|int, mixed>
-
The data array representing the object.
- $options : array<string|int, mixed> = array()
-
Additional options when writing the XML.
- previous: The previous XML text (default: empty string) - relaxed: Relaxed error checking (default: false)
Tags
Return values
string —The data as an XML string.
_getParameters()
Generate the internal parameter list for this operation.
private
_getParameters(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
-
The options for this operation.
Return values
array<string|int, mixed> —_getParser()
Fetch the XML parser.
private
_getParser() : Horde_Kolab_Format_Xml_Parser
Return values
Horde_Kolab_Format_Xml_Parser —The parser.
_getRoot()
Return the root handler.
private
_getRoot([array<string|int, mixed> $params = array() ]) : Horde_Kolab_Xml_Type_Root
Parameters
- $params : array<string|int, mixed> = array()
-
Additional parameters.
Return values
Horde_Kolab_Xml_Type_Root —The root handler.
_refreshParser()
Throw the parser instance away.
private
_refreshParser() : null