XML_Serializer
[ class tree: XML_Serializer ] [ index: XML_Serializer ] [ all elements ]

File: Serializer.php

Source Location: /XML_Serializer-0.17.0/Serializer.php

Classes:

XML_Serializer
Creates XML documents from PHP data structures like arrays, objects or scalars.

Page Details:

XML_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.

Includes:

require_once('XML/Util.php') [line 35]
uses XML_Util to create XML tags
require_once('PEAR.php') [line 30]
uses PEAR error management

XML_SERIALIZER_ENTITIES_HTML [line 320]

XML_SERIALIZER_ENTITIES_HTML = XML_UTIL_ENTITIES_HTML
replace HTML entitites

[ Top ]



XML_SERIALIZER_ENTITIES_NONE [line 302]

XML_SERIALIZER_ENTITIES_NONE = XML_UTIL_ENTITIES_NONE
do not replace entitites

[ Top ]



XML_SERIALIZER_ENTITIES_XML [line 308]

XML_SERIALIZER_ENTITIES_XML = XML_UTIL_ENTITIES_XML
replace all XML entitites

This setting will replace <, >, ", ' and &


[ Top ]



XML_SERIALIZER_ENTITIES_XML_REQUIRED [line 314]

XML_SERIALIZER_ENTITIES_XML_REQUIRED = XML_UTIL_ENTITIES_XML_REQUIRED
replace only required XML entitites

This setting will replace <, " and &


[ Top ]



XML_SERIALIZER_ERROR_NO_SERIALIZATION [line 297]

XML_SERIALIZER_ERROR_NO_SERIALIZATION = 51
error code for no serialization done

[ Top ]



XML_SERIALIZER_MODE_DEFAULT [line 285]

XML_SERIALIZER_MODE_DEFAULT = 'default'
default mode

[ Top ]



XML_SERIALIZER_MODE_SIMPLEXML [line 292]

XML_SERIALIZER_MODE_SIMPLEXML = 'simplexml'
SimpleXML mode

When serializing indexed arrays, the key of the parent value is used as a tagname.


[ Top ]



XML_SERIALIZER_OPTION_ATTRIBUTES_KEY [line 198]

XML_SERIALIZER_OPTION_ATTRIBUTES_KEY = 'attributesArray'
option: all values in this key will be treated as attributes

Possible values:

  • array


[ Top ]



XML_SERIALIZER_OPTION_ATTRIBUTE_CLASS [line 119]

XML_SERIALIZER_OPTION_ATTRIBUTE_CLASS = 'classAttribute'
option: attribute for class (only if typeHints => true)

Possible values:

  • any string (default is _class)


[ Top ]



XML_SERIALIZER_OPTION_ATTRIBUTE_KEY [line 103]

XML_SERIALIZER_OPTION_ATTRIBUTE_KEY = 'keyAttribute'
option: attribute where original key is stored

Possible values:

  • any string (default is _originalKey)


[ Top ]



XML_SERIALIZER_OPTION_ATTRIBUTE_TYPE [line 111]

XML_SERIALIZER_OPTION_ATTRIBUTE_TYPE = 'typeAttribute'
option: attribute for type (only if typeHints => true)

Possible values:

  • any string (default is _type)


[ Top ]



XML_SERIALIZER_OPTION_CDATA_SECTIONS [line 279]

XML_SERIALIZER_OPTION_CDATA_SECTIONS = 'cdata'
option: whether to use cdata sections for character data

Possible values:

  • true
  • false (default)


[ Top ]



XML_SERIALIZER_OPTION_CLASSNAME_AS_TAGNAME [line 95]

XML_SERIALIZER_OPTION_CLASSNAME_AS_TAGNAME = 'classAsTagName'
option: use classname for objects in indexed arrays

Possible values:

  • true (default)
  • false


[ Top ]



XML_SERIALIZER_OPTION_COMMENT_KEY [line 216]

XML_SERIALIZER_OPTION_COMMENT_KEY = 'commentName'
option: this value will be used in a comment, instead of creating a new tag

Possible values:

  • string
  • null (default)


[ Top ]



XML_SERIALIZER_OPTION_CONTENT_KEY [line 207]

XML_SERIALIZER_OPTION_CONTENT_KEY = 'contentName'
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:

  • string
  • null (default)


[ Top ]



XML_SERIALIZER_OPTION_DEFAULT_TAG [line 86]

XML_SERIALIZER_OPTION_DEFAULT_TAG = 'defaultTagName'
option: default name for tags

Possible values:

  • any string (XML_Serializer_Tag is default)


[ Top ]



XML_SERIALIZER_OPTION_DOCTYPE [line 173]

XML_SERIALIZER_OPTION_DOCTYPE = 'doctype'
option: supply a string or an array with id and uri ({@see XML_Util::getDoctypeDeclaration()}

Possible values:

  • string
  • array


[ Top ]



XML_SERIALIZER_OPTION_DOCTYPE_ENABLED [line 164]

XML_SERIALIZER_OPTION_DOCTYPE_ENABLED = 'addDoctype'
option: add a doctype declaration

Possible values:

  • true
  • false (default)


[ Top ]



XML_SERIALIZER_OPTION_ENCODE_FUNC [line 232]

XML_SERIALIZER_OPTION_ENCODE_FUNC = 'encodeFunction'
option: function that will be applied before serializing

Possible values:

  • any valid PHP callback


[ Top ]



XML_SERIALIZER_OPTION_ENTITIES [line 252]

XML_SERIALIZER_OPTION_ENTITIES = 'replaceEntities'
option: type of entities to replace

Possible values:

  • XML_SERIALIZER_ENTITIES_NONE
  • XML_SERIALIZER_ENTITIES_XML (default)
  • XML_SERIALIZER_ENTITIES_XML_REQUIRED
  • XML_SERIALIZER_ENTITIES_HTML


[ Top ]



XML_SERIALIZER_OPTION_IGNORE_NULL [line 270]

XML_SERIALIZER_OPTION_IGNORE_NULL = 'ignoreNull'
option: whether to ignore properties that are set to null

Possible values:

  • true
  • false (default)


[ Top ]



XML_SERIALIZER_OPTION_INDENT [line 43]

XML_SERIALIZER_OPTION_INDENT = 'indent'
option: string used for indentation

Possible values:

  • any string (default is any string)


[ Top ]



XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES [line 146]

XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES = 'indentAttributes'
option: indent the attributes, if set to '_auto', it will indent attributes so they all start at the same column

Possible values:

  • true
  • false (default)


[ Top ]



XML_SERIALIZER_OPTION_LINEBREAKS [line 51]

XML_SERIALIZER_OPTION_LINEBREAKS = 'linebreak'
option: string used for linebreaks

Possible values:

  • any string (default is \n)


[ Top ]



XML_SERIALIZER_OPTION_MODE [line 155]

XML_SERIALIZER_OPTION_MODE = 'mode'
option: use 'simplexml' to use parent name as tagname if transforming an indexed array

Possible values:

  • XML_SERIALIZER_MODE_DEFAULT (default)
  • XML_SERIALIZER_MODE_SIMPLEXML


[ Top ]



XML_SERIALIZER_OPTION_NAMESPACE [line 241]

XML_SERIALIZER_OPTION_NAMESPACE = 'namespace'
option: function that will be applied before serializing

Possible values:

  • string
  • null (default)


[ Top ]



XML_SERIALIZER_OPTION_PREPEND_ATTRIBUTES [line 137]

XML_SERIALIZER_OPTION_PREPEND_ATTRIBUTES = 'prependAttributes'
option: prepend string for attributes

Possible values:

  • any string (default is any string)


[ Top ]



XML_SERIALIZER_OPTION_RETURN_RESULT [line 261]

XML_SERIALIZER_OPTION_RETURN_RESULT = 'returnResult'
option: whether to return the result of the serialization from serialize()

Possible values:

  • true
  • false (default)


[ Top ]



XML_SERIALIZER_OPTION_ROOT_ATTRIBS [line 190]

XML_SERIALIZER_OPTION_ROOT_ATTRIBS = 'rootAttributes'
option: attributes of the root tag

Possible values:

  • array


[ Top ]



XML_SERIALIZER_OPTION_ROOT_NAME [line 182]

XML_SERIALIZER_OPTION_ROOT_NAME = 'rootName'
option: name of the root tag

Possible values:

  • string
  • null (default)


[ Top ]



XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES [line 129]

XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES = 'scalarAsAttributes'
option: scalar values (strings, ints,..) will be serialized as attribute

Possible values:

  • true
  • false (default)
  • array which sets this option on a per-tag basis


[ Top ]



XML_SERIALIZER_OPTION_TAGMAP [line 224]

XML_SERIALIZER_OPTION_TAGMAP = 'tagMap'
option: tag names that will be changed

Possible values:

  • array


[ Top ]



XML_SERIALIZER_OPTION_TYPEHINTS [line 60]

XML_SERIALIZER_OPTION_TYPEHINTS = 'typeHints'
option: enable type hints

Possible values:

  • true
  • false


[ Top ]



XML_SERIALIZER_OPTION_XML_DECL_ENABLED [line 69]

XML_SERIALIZER_OPTION_XML_DECL_ENABLED = 'addDecl'
option: add an XML declaration

Possible values:

  • true
  • false


[ Top ]



XML_SERIALIZER_OPTION_XML_ENCODING [line 78]

XML_SERIALIZER_OPTION_XML_ENCODING = 'encoding'
option: encoding of the document

Possible values:

  • any valid encoding
  • null (default)


[ Top ]



Documentation generated on Sat, 24 Sep 2005 11:40:09 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.