\Horde_Kolab_Format_Xml_Contact

Kolab XML handler for contact groupware objects

Copyright 2007-2009 Klarälvdalens Datakonsult AB

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
load()
save()
getVersion()
No public properties found
PRODUCT_ID
VALUE_DEFAULT
VALUE_MAYBE_MISSING
VALUE_NOT_EMPTY
VALUE_CALCULATED
TYPE_STRING
TYPE_INTEGER
TYPE_BOOLEAN
TYPE_DATE
TYPE_DATETIME
TYPE_DATE_OR_DATETIME
TYPE_COLOR
TYPE_COMPOSITE
TYPE_MULTIPLE
TYPE_XML
TYPE_ROOT
No protected methods found
$_parser
$_factory
$_version
$_xmldoc
$_root_name
$_root_version
$_fields_specific
N/A
_refreshParser()
_getParser()
_getParameters()
_getRoot()
No private properties found
N/A

Constants

PRODUCT_ID

PRODUCT_ID

Defines a XML value that should get a default value if missing

VALUE_DEFAULT

VALUE_DEFAULT

Defines a XML value that should get a default value if missing

VALUE_MAYBE_MISSING

VALUE_MAYBE_MISSING

Defines a XML value that may be missing

VALUE_NOT_EMPTY

VALUE_NOT_EMPTY

Defines a XML value that may not be missing

VALUE_CALCULATED

VALUE_CALCULATED

Defines a XML value that will be calculated by its own function

TYPE_STRING

TYPE_STRING

Defines a XML value as string type

TYPE_INTEGER

TYPE_INTEGER

Defines a XML value as integer type

TYPE_BOOLEAN

TYPE_BOOLEAN

Defines a XML value as boolean type

TYPE_DATE

TYPE_DATE

Defines a XML value as date type

TYPE_DATETIME

TYPE_DATETIME

Defines a XML value as datetime type

TYPE_DATE_OR_DATETIME

TYPE_DATE_OR_DATETIME

Defines a XML value as date or datetime type

TYPE_COLOR

TYPE_COLOR

Defines a XML value as color type

TYPE_COMPOSITE

TYPE_COMPOSITE

Defines a XML value as composite value type

TYPE_MULTIPLE

TYPE_MULTIPLE

Defines a XML value as array type

TYPE_XML

TYPE_XML

Defines a XML value as raw XML

TYPE_ROOT

TYPE_ROOT

Represents the Kolab format root node

Properties

$_version

$_version : integer

Requested version of the data array to return

Type

integer

$_xmldoc

$_xmldoc : \DOMDocument

The XML document this driver works with.

Type

\DOMDocument

$_root_name

$_root_name : string

The name of the root element.

Type

string

$_root_version

$_root_version : string

Kolab format version of the root element.

Type

string

$_fields_specific

$_fields_specific : array

Specific data fields for the contact object

Type

array

Methods

__construct()

__construct(\Horde_Kolab_Format_Xml_Parser  $parser, \Horde_Kolab_Format_Factory  $factory, array  $params = null) 

Constructor

Parameters

\Horde_Kolab_Format_Xml_Parser $parser

The XML parser.

\Horde_Kolab_Format_Factory $factory

The factory for helper objects.

array $params

Any additional options.

load()

load(resource  $xml, array  $options = array()) : array

Load an object based on the given XML stream. The stream may only contain UTF-8 data.

Parameters

resource $xml

The XML stream of the message.

array $options

Additional options when parsing the XML.

- relaxed: Relaxed error checking (default: false)

Throws

\Horde_Kolab_Format_Exception

If parsing the XML data failed.

Returns

array —

The data array representing the object.

save()

save(array  $object, array  $options = array()) : string

Convert the data to a XML stream. Strings contained in the data array may only be provided as UTF-8 data.

Parameters

array $object

The data array representing the object.

array $options

Additional options when writing the XML.

- previous: The previous XML text (default: empty string)
- relaxed: Relaxed error checking (default: false)

Throws

\Horde_Kolab_Format_Exception

If converting the data to XML failed.

Returns

string —

The data as an XML string.

getVersion()

getVersion() : integer

Return the API version of the data structures that are being used for in- and output.

Returns

integer —

The version number;

_refreshParser()

_refreshParser() : NULL

Throw the parser instance away.

Returns

NULL

_getParameters()

_getParameters(array  $options) : array

Generate the internal parameter list for this operation.

Parameters

array $options

The options for this operation.

Returns

array

_getRoot()

_getRoot(array  $params = array()) : \Horde_Kolab_Xml_Type_Root

Return the root handler.

Parameters

array $params

Additional parameters.

Returns

\Horde_Kolab_Xml_Type_Root —

The root handler.