PHP Class Horde_Kolab_Format_Xml, horde

For implementing a new format type you will have to inherit this class and provide a _load/_save function. Copyright 2007-2009 Klarälvdalens Datakonsult AB Copyright 2010-2014 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.
Author: Thomas Jarosch ([email protected])
Author: Gunnar Wrobel ([email protected])
Inheritance: implements Horde_Kolab_Format
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_factory Horde_Kolab_Format_Factory The factory for additional objects.
$_fields_specific array Specific data fields for the contact 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 integer Requested version of the data array to return
$_xmldoc DOMDocument The XML document this driver works with.

Méthodes publiques

Méthode Description
__construct ( Horde_Kolab_Format_Xml_Parser $parser, Horde_Kolab_Format_Factory $factory, array $params = null ) Constructor
getVersion ( ) : integer Return the API version of the data structures that are being used for in- and output.
load ( resource $xml, array $options = [] ) : array Load an object based on the given XML stream. The stream may only contain UTF-8 data.
save ( array $object, array $options = [] ) : string Convert the data to a XML stream. Strings contained in the data array may only be provided as UTF-8 data.

Private Methods

Méthode Description
_getParameters ( array $options ) : array Generate the internal parameter list for this operation.
_getParser ( ) : Horde_Kolab_Format_Xml_Parser Fetch the XML parser.
_getRoot ( array $params = [] ) : Horde_Kolab_Xml_Type_Root Return the root handler.
_refreshParser ( ) : null Throw the parser instance away.

Method Details

__construct() public méthode

Constructor
public __construct ( Horde_Kolab_Format_Xml_Parser $parser, Horde_Kolab_Format_Factory $factory, array $params = null )
$parser Horde_Kolab_Format_Xml_Parser The XML parser.
$factory Horde_Kolab_Format_Factory The factory for helper objects.
$params array Any additional options.

getVersion() public méthode

Return the API version of the data structures that are being used for in- and output.
public getVersion ( ) : integer
Résultat integer The version number;

load() public méthode

Load an object based on the given XML stream. The stream may only contain UTF-8 data.
public load ( resource $xml, array $options = [] ) : array
$xml resource The XML stream of the message.
$options array Additional options when parsing the XML.
- relaxed: Relaxed error checking (default: false)
Résultat array The data array representing the object.

save() public méthode

Convert the data to a XML stream. Strings contained in the data array may only be provided as UTF-8 data.
public save ( array $object, array $options = [] ) : string
$object array The data array representing the object.
$options array Additional options when writing the XML.
- previous: The previous XML text (default: empty string)
- relaxed: Relaxed error checking (default: false)
Résultat string The data as an XML string.

Property Details

$_factory protected_oe property

The factory for additional objects.
protected Horde_Kolab_Format_Factory $_factory
Résultat Horde_Kolab_Format_Factory

$_fields_specific protected_oe property

Specific data fields for the contact object
protected array $_fields_specific
Résultat array

$_parser protected_oe property

The parser dealing with the input.
protected Horde_Kolab_Format_Xml_Parser $_parser
Résultat Horde_Kolab_Format_Xml_Parser

$_root_name protected_oe property

The name of the root element.
protected string $_root_name
Résultat string

$_root_version protected_oe property

Kolab format version of the root element.
protected string $_root_version
Résultat string

$_version protected_oe property

Requested version of the data array to return
protected int $_version
Résultat integer

$_xmldoc protected_oe property

The XML document this driver works with.
protected DOMDocument $_xmldoc
Résultat DOMDocument