PHP Класс Horde_Kolab_Format_Xml_Type_Base, horde

Copyright 2011-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Автор: Gunnar Wrobel ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$default string A default value if required.
$value integer Indicate which value type is expected.

Открытые методы

Метод Описание
__construct ( Horde_Kolab_Format_Factory $factory ) Constructor
getParam ( string $name ) : mixed Return a parameter value.
load ( string $name, &$attributes, DOMNode $parent_node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [] ) : DOMNode | boolean Load the node value from the Kolab object.
loadNodeValue ( DOMNode $node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [] ) : mixed | null Load the value of a node.
save ( string $name, array $attributes, DOMNode $parent_node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [] ) : DOMNode | boolean Update the specified attribute.
saveNodeValue ( string $name, mixed $value, DOMNode $parent_node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [], DOMNode | null $old_node = false ) : DOMNode | boolean Update the specified attribute.

Защищенные методы

Метод Описание
checkMissing ( string $key, array $params, string $attribute ) Validate that the parameter array contains all required parameters.
createSubType ( string $type, array $params ) : Horde_Kolab_Format_Xml_Type Create a handler for the sub type of this attribute.
generateWriteValue ( string $name, array $attributes, array $params ) : mixed Generate the value that should be written to the node. Override in the extending classes.
isRelaxed ( array $params ) : boolean Returns if the XML handling should be relaxed.
loadMissing ( string $name, array $params ) : mixed Load a default value for a node.

Описание методов

__construct() публичный Метод

Constructor
public __construct ( Horde_Kolab_Format_Factory $factory )
$factory Horde_Kolab_Format_Factory The factory for any additional objects required.

checkMissing() защищенный Метод

Validate that the parameter array contains all required parameters.
protected checkMissing ( string $key, array $params, string $attribute )
$key string The parameter name.
$params array The parameters.
$attribute string The attribute name.

createSubType() защищенный Метод

Create a handler for the sub type of this attribute.
protected createSubType ( string $type, array $params ) : Horde_Kolab_Format_Xml_Type
$type string The sub type.
$params array Additional parameters.
Результат Horde_Kolab_Format_Xml_Type The sub type handler.

generateWriteValue() защищенный Метод

Generate the value that should be written to the node. Override in the extending classes.
protected generateWriteValue ( string $name, array $attributes, array $params ) : mixed
$name string The name of the the attribute to be updated.
$attributes array The data array that holds all attribute values.
$params array The parameters for this write operation.
Результат mixed The value to be written.

getParam() публичный Метод

Return a parameter value.
public getParam ( string $name ) : mixed
$name string The parameter name.
Результат mixed The parameter value.

isRelaxed() защищенный Метод

Returns if the XML handling should be relaxed.
protected isRelaxed ( array $params ) : boolean
$params array The parameters.
Результат boolean True if the XML should not be strict.

load() публичный Метод

Load the node value from the Kolab object.
public load ( string $name, &$attributes, DOMNode $parent_node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [] ) : DOMNode | boolean
$name string The name of the the attribute to be fetched.
$parent_node DOMNode The parent node of the node to be loaded.
$helper Horde_Kolab_Format_Xml_Helper A XML helper instance.
$params array Additiona parameters for this parse operation.
Результат DOMNode | boolean The named DOMNode or false if no node value was found.

loadMissing() защищенный Метод

Load a default value for a node.
protected loadMissing ( string $name, array $params ) : mixed
$name string The attribute name.
$params array The parameters for the current operation.
Результат mixed The default value.

loadNodeValue() публичный Метод

Load the value of a node.
public loadNodeValue ( DOMNode $node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [] ) : mixed | null
$node DOMNode Retrieve value for this node.
$helper Horde_Kolab_Format_Xml_Helper A XML helper instance.
$params array Additiona parameters for this parse operation.
Результат mixed | null The value or null if no value was found.

save() публичный Метод

Update the specified attribute.
public save ( string $name, array $attributes, DOMNode $parent_node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [] ) : DOMNode | boolean
$name string The name of the the attribute to be updated.
$attributes array The data array that holds all attribute values.
$parent_node DOMNode The parent node of the node that should be updated.
$helper Horde_Kolab_Format_Xml_Helper A XML helper instance.
$params array Additional parameters for this write operation.
Результат DOMNode | boolean The new/updated child node or false if this failed.

saveNodeValue() публичный Метод

Update the specified attribute.
public saveNodeValue ( string $name, mixed $value, DOMNode $parent_node, Horde_Kolab_Format_Xml_Helper $helper, array $params = [], DOMNode | null $old_node = false ) : DOMNode | boolean
$name string The name of the attribute to be updated.
$value mixed The value to store.
$parent_node DOMNode The parent node of the node that should be updated.
$helper Horde_Kolab_Format_Xml_Helper A XML helper instance.
$params array The parameters for this write operation.
$old_node DOMNode | null The previous value (or null if there is none).
Результат DOMNode | boolean The new/updated child node or false if this failed.

Описание свойств

$default защищенное свойство

A default value if required.
protected string $default
Результат string

$value защищенное свойство

Indicate which value type is expected.
protected int $value
Результат integer