\Horde_Kolab_Format_Xml_Type_Composite_Recurrence_V1

Handles api version 1 of recurrence data.

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.

Summary

Methods
Properties
Constants
load()
saveNodeValue()
loadNodeValue()
save()
__construct()
getParam()
No public properties found
No constants found
generateWriteValue()
loadMissing()
checkMissing()
isRelaxed()
createSubType()
$elements
$value
$default
$merge
N/A
_writeComposite()
$_factory
$_xml_types
N/A

Properties

$elements

$elements : 

The elements of the composite attribute.

Type

$value

$value : integer

Indicate which value type is expected.

Type

integer

$default

$default : string

A default value if required.

Type

string

$merge

$merge : boolean

Should the values be merged into the parent attributes?

Type

boolean

$_xml_types

$_xml_types : array

Collects xml types already created.

Type

array

Methods

load()

load(string  $name,   $attributes, \DOMNode  $parent_node, \Horde_Kolab_Format_Xml_Helper  $helper, array  $params = array()) : \DOMNode|boolean

Load the node value from the Kolab object.

Parameters

string $name

The name of the the attribute to be fetched.

$attributes
\DOMNode $parent_node

The parent node of the node to be loaded.

\Horde_Kolab_Format_Xml_Helper $helper

A XML helper instance.

array $params

Additiona parameters for this parse operation.

Returns

\DOMNode|boolean —

The named DOMNode or false if no node value was found.

saveNodeValue()

saveNodeValue(string  $name, mixed  $value, \DOMNode  $parent_node, \Horde_Kolab_Format_Xml_Helper  $helper, array  $params = array(), \DOMNode|NULL  $old_node = false) : \DOMNode|boolean

Update the specified attribute.

Parameters

string $name

The name of the attribute to be updated.

mixed $value

The value to store.

\DOMNode $parent_node

The parent node of the node that should be updated.

\Horde_Kolab_Format_Xml_Helper $helper

A XML helper instance.

array $params

The parameters for this write operation.

\DOMNode|NULL $old_node

The previous value (or null if there is none).

Throws

\Horde_Kolab_Format_Exception

If converting the data to XML failed.

Returns

\DOMNode|boolean —

The new/updated child node or false if this failed.

loadNodeValue()

loadNodeValue(\DOMNode  $node, \Horde_Kolab_Format_Xml_Helper  $helper, array  $params = array()) : mixed|null

Load the value of a node.

Parameters

\DOMNode $node

Retrieve value for this node.

\Horde_Kolab_Format_Xml_Helper $helper

A XML helper instance.

array $params

Additiona parameters for this parse operation.

Returns

mixed|null —

The value or null if no value was found.

save()

save(string  $name, array  $attributes, \DOMNode  $parent_node, \Horde_Kolab_Format_Xml_Helper  $helper, array  $params = array()) : \DOMNode|boolean

Update the specified attribute.

Parameters

string $name

The name of the the attribute to be updated.

array $attributes

The data array that holds all attribute values.

\DOMNode $parent_node

The parent node of the node that should be updated.

\Horde_Kolab_Format_Xml_Helper $helper

A XML helper instance.

array $params

Additional parameters for this write operation.

Throws

\Horde_Kolab_Format_Exception

If converting the data to XML failed.

Returns

\DOMNode|boolean —

The new/updated child node or false if this failed.

__construct()

__construct(\Horde_Kolab_Format_Factory  $factory) 

Constructor

Parameters

\Horde_Kolab_Format_Factory $factory

The factory for any additional objects required.

getParam()

getParam(string  $name) : mixed

Return a parameter value.

Parameters

string $name

The parameter name.

Returns

mixed —

The parameter value.

generateWriteValue()

generateWriteValue(string  $name, array  $attributes, array  $params) : mixed

Generate the value that should be written to the node. Override in the extending classes.

Parameters

string $name

The name of the the attribute to be updated.

array $attributes

The data array that holds all attribute values.

array $params

The parameters for this write operation.

Returns

mixed —

The value to be written.

loadMissing()

loadMissing(string  $name, array  $params) : mixed

Load a default value for a node.

Parameters

string $name

The attribute name.

array $params

The parameters for the current operation.

Throws

\Horde_Kolab_Format_Exception

In case the attribute may not be missing or the default value was left undefined.

Returns

mixed —

The default value.

checkMissing()

checkMissing(string  $key, array  $params, string  $attribute) 

Validate that the parameter array contains all required parameters.

Parameters

string $key

The parameter name.

array $params

The parameters.

string $attribute

The attribute name.

Throws

\Horde_Kolab_Format_Exception

In case required parameters are missing.

isRelaxed()

isRelaxed(array  $params) : boolean

Returns if the XML handling should be relaxed.

Parameters

array $params

The parameters.

Returns

boolean —

True if the XML should not be strict.

createSubType()

createSubType(string  $type, array  $params) : \Horde_Kolab_Format_Xml_Type

Create a handler for the sub type of this attribute.

Parameters

string $type

The sub type.

array $params

Additional parameters.

Returns

\Horde_Kolab_Format_Xml_Type —

The sub type handler.

_writeComposite()

_writeComposite(\DOMNode  $parent_node, string  $name, array  $values, \Horde_Kolab_Format_Xml_Helper  $helper, array  $params) : array

Write a composite value to a parent node.

Parameters

\DOMNode $parent_node

The parent node of the node that should be updated.

string $name

The name of the the attribute to be updated.

array $values

The values to write.

\Horde_Kolab_Format_Xml_Helper $helper

A XML helper instance.

array $params

The parameters for this write operation.

Throws

\Horde_Kolab_Format_Exception

If converting the data to XML failed.

Returns

array —

The list of new/updated child nodes.