/PEAR/XML/Serializer.phpXML_Serializer
Creates XML documents from PHP data structures like arrays, objects or scalars.
PHP versions 4 and 5
LICENSE: This source file is subject to version 3.0 of the PHP license that is available through the world-wide-web at the following URI: http://www.php.net/license/3_0.txt. If you did not receive a copy of the PHP License and are unable to obtain it through the web, please send a note to license@php.net so we can mail you a copy immediately.
| Class | Description |
|---|---|
XML_Serializer
|
Creates XML documents from PHP data structures like arrays, objects or scalars. |
XML_SERIALIZER_ENTITIES_HTML = XML_UTIL_ENTITIES_HTML
(line 320)
replace HTML entitites
XML_SERIALIZER_ENTITIES_NONE = XML_UTIL_ENTITIES_NONE
(line 302)
do not replace entitites
XML_SERIALIZER_ENTITIES_XML = XML_UTIL_ENTITIES_XML
(line 308)
replace all XML entitites
This setting will replace <, >, ", ' and &
XML_SERIALIZER_ENTITIES_XML_REQUIRED = XML_UTIL_ENTITIES_XML_REQUIRED
(line 314)
replace only required XML entitites
This setting will replace <, " and &
XML_SERIALIZER_ERROR_NO_SERIALIZATION = 51
(line 297)
error code for no serialization done
XML_SERIALIZER_MODE_DEFAULT = 'default'
(line 285)
default mode
XML_SERIALIZER_MODE_SIMPLEXML = 'simplexml'
(line 292)
SimpleXML mode
When serializing indexed arrays, the key of the parent value is used as a tagname.
XML_SERIALIZER_OPTION_ATTRIBUTES_KEY = 'attributesArray'
(line 198)
option: all values in this key will be treated as attributes
Possible values:
XML_SERIALIZER_OPTION_ATTRIBUTE_CLASS = 'classAttribute'
(line 119)
option: attribute for class (only if typeHints => true)
Possible values:
XML_SERIALIZER_OPTION_ATTRIBUTE_KEY = 'keyAttribute'
(line 103)
option: attribute where original key is stored
Possible values:
XML_SERIALIZER_OPTION_ATTRIBUTE_TYPE = 'typeAttribute'
(line 111)
option: attribute for type (only if typeHints => true)
Possible values:
XML_SERIALIZER_OPTION_CDATA_SECTIONS = 'cdata'
(line 279)
option: whether to use cdata sections for character data
Possible values:
XML_SERIALIZER_OPTION_CLASSNAME_AS_TAGNAME = 'classAsTagName'
(line 95)
option: use classname for objects in indexed arrays
Possible values:
XML_SERIALIZER_OPTION_COMMENT_KEY = 'commentName'
(line 216)
option: this value will be used in a comment, instead of creating a new tag
Possible values:
XML_SERIALIZER_OPTION_CONTENT_KEY = 'contentName'
(line 207)
option: this value will be used directly as content, instead of creating a new tag, may only be used in conjuction with attributesArray
Possible values:
XML_SERIALIZER_OPTION_DEFAULT_TAG = 'defaultTagName'
(line 86)
option: default name for tags
Possible values:
XML_SERIALIZER_OPTION_DOCTYPE = 'doctype'
(line 173)
option: supply a string or an array with id and uri ({@see XML_Util::getDoctypeDeclaration()}
Possible values:
XML_SERIALIZER_OPTION_DOCTYPE_ENABLED = 'addDoctype'
(line 164)
option: add a doctype declaration
Possible values:
XML_SERIALIZER_OPTION_ENCODE_FUNC = 'encodeFunction'
(line 232)
option: function that will be applied before serializing
Possible values:
XML_SERIALIZER_OPTION_ENTITIES = 'replaceEntities'
(line 252)
option: type of entities to replace
Possible values:
XML_SERIALIZER_OPTION_IGNORE_NULL = 'ignoreNull'
(line 270)
option: whether to ignore properties that are set to null
Possible values:
XML_SERIALIZER_OPTION_INDENT = 'indent'
(line 43)
option: string used for indentation
Possible values:
XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES = 'indentAttributes'
(line 146)
option: indent the attributes, if set to '_auto', it will indent attributes so they all start at the same column
Possible values:
XML_SERIALIZER_OPTION_LINEBREAKS = 'linebreak'
(line 51)
option: string used for linebreaks
Possible values:
XML_SERIALIZER_OPTION_MODE = 'mode'
(line 155)
option: use 'simplexml' to use parent name as tagname if transforming an indexed array
Possible values:
XML_SERIALIZER_OPTION_NAMESPACE = 'namespace'
(line 241)
option: function that will be applied before serializing
Possible values:
XML_SERIALIZER_OPTION_PREPEND_ATTRIBUTES = 'prependAttributes'
(line 137)
option: prepend string for attributes
Possible values:
XML_SERIALIZER_OPTION_RETURN_RESULT = 'returnResult'
(line 261)
option: whether to return the result of the serialization from serialize()
Possible values:
XML_SERIALIZER_OPTION_ROOT_ATTRIBS = 'rootAttributes'
(line 190)
option: attributes of the root tag
Possible values:
XML_SERIALIZER_OPTION_ROOT_NAME = 'rootName'
(line 182)
option: name of the root tag
Possible values:
XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES = 'scalarAsAttributes'
(line 129)
option: scalar values (strings, ints,..) will be serialized as attribute
Possible values:
XML_SERIALIZER_OPTION_TAGMAP = 'tagMap'
(line 224)
option: tag names that will be changed
Possible values:
XML_SERIALIZER_OPTION_TYPEHINTS = 'typeHints'
(line 60)
option: enable type hints
Possible values:
XML_SERIALIZER_OPTION_XML_DECL_ENABLED = 'addDecl'
(line 69)
option: add an XML declaration
Possible values:
XML_SERIALIZER_OPTION_XML_ENCODING = 'encoding'
(line 78)
option: encoding of the document
Possible values:
Documentation generated on Mon, 04 Dec 2006 11:09:55 -0500 by phpDocumentor 1.3.0RC3