cvs: pear /XML_Serializer Serializer.php

From: Date: Wed, 06 May 2009 13:23:35 +0000
Subject: cvs: pear /XML_Serializer Serializer.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-56050@lists.php.net to get a copy of this message
ashnazg Wed May 6 13:23:35 2009 UTC Modified files: /pear/XML_Serializer Serializer.php Log: clean up some comment blocks; spacing cleanups;

http://cvs.php.net/viewvc.cgi/pear/XML_Serializer/Serializer.php?r1=1.57&r2=1.58&diff_format=u Index: pear/XML_Serializer/Serializer.php diff -u pear/XML_Serializer/Serializer.php:1.57 pear/XML_Serializer/Serializer.php:1.58 --- pear/XML_Serializer/Serializer.php:1.57 Sun Jan 25 03:51:11 2009 +++ pear/XML_Serializer/Serializer.php Wed May 6 13:23:35 2009 @@ -42,7 +42,7 @@ * @author Stephan Schmidt <schst@php.net> * @copyright 2003-2008 Stephan Schmidt <schst@php.net> * @license http://opensource.org/licenses/bsd-license New BSD License - * @version CVS: $Id: Serializer.php,v 1.57 2009/01/25 03:51:11 ashnazg Exp $ + * @version CVS: $Id: Serializer.php,v 1.58 2009/05/06 13:23:35 ashnazg Exp $ * @link http://pear.php.net/package/XML_Serializer * @see XML_Unserializer */ @@ -160,7 +160,7 @@ define('XML_SERIALIZER_OPTION_PREPEND_ATTRIBUTES', 'prependAttributes'); /** - * option: indent the attributes, if set to '_auto', + * option: indent the attributes, if set to '_auto', * it will indent attributes so they all start at the same column * * Possible values: @@ -171,7 +171,7 @@ define('XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES', 'indentAttributes'); /** - * option: use 'simplexml' to use parent name as tagname + * option: use 'simplexml' to use parent name as tagname * if transforming an indexed array * * Possible values: @@ -190,7 +190,7 @@ define('XML_SERIALIZER_OPTION_DOCTYPE_ENABLED', 'addDoctype'); /** - * option: supply a string or an array with id and uri + * option: supply a string or an array with id and uri * ({@see XML_Util::getDoctypeDeclaration()} * * Possible values: @@ -225,8 +225,8 @@ define('XML_SERIALIZER_OPTION_ATTRIBUTES_KEY', 'attributesArray'); /** - * option: this value will be used directly as content, - * instead of creating a new tag, may only be used + * 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: @@ -351,12 +351,12 @@ /** * Creates XML documents from PHP data structures like arrays, objects or scalars. * - * this class can be used in two modes: + * This class can be used in two modes: * - * 1. create an XML document from an array or object that is processed by other - * applications. That means, you can create a RDF document from an array in the + * 1. Create an XML document from an array or object that is processed by other + * applications. That means you can create an RDF document from an array in the * following format: - * + * <code> * $data = array( * 'channel' => array( * 'title' => 'Example RDF channel', @@ -376,33 +376,33 @@ * ) * ) * ); + * </code> * - * to create a RDF document from this array do the following: - * - * require_once 'XML/Serializer.php'; + * To create an RDF document from this array, do the following: * - * $options = array( + * <code> + * require_once 'XML/Serializer.php'; + * $options = array( * XML_SERIALIZER_OPTION_INDENT => "\t", // indent with tabs * XML_SERIALIZER_OPTION_LINEBREAKS => "\n", // use UNIX line breaks * XML_SERIALIZER_OPTION_ROOT_NAME => 'rdf:RDF',// root tag - * XML_SERIALIZER_OPTION_DEFAULT_TAG => 'item' // tag for values + * XML_SERIALIZER_OPTION_DEFAULT_TAG => 'item' // tag for values * // with numeric keys - * ); - * - * $serializer = new XML_Serializer($options); - * $rdf = $serializer->serialize($data); - * - * You will get a complete XML document that can be processed like any RDF document. - * - * 2. this classes can be used to serialize any data structure in a way that it can - * later be unserialized again. - * XML_Serializer will store the type of the value and additional meta information - * in attributes of the surrounding tag. This meat information can later be used - * to restore the original data structure in PHP. If you want XML_Serializer - * to add meta information to the tags, add - * + * ); + * $serializer = new XML_Serializer($options); + * $rdf = $serializer->serialize($data); + * </code> + * + * You will get a complete XML document that can be processed like any RDF document. + * + * 2. This class can be used to serialize any data structure in a way that it can + * later be unserialized again. XML_Serializer will store the type of the value + * and additional meta information in attributes of the surrounding tag. This + * meta information can later be used to restore the original data structure + * in PHP. If you want XML_Serializer to add meta information to the tags, add + * <code> * XML_SERIALIZER_OPTION_TYPEHINTS => true - * + * </code> * to the options array in the constructor. * * @category XML @@ -413,48 +413,49 @@ * @version Release: @package_version@ * @link http://pear.php.net/package/XML_Serializer * @see XML_Unserializer + * @todo replace extending PEAR class with instead using a PEAR_Error object */ class XML_Serializer extends PEAR { /** - * list of all available options + * List of all available options * * @access private * @var array */ var $_knownOptions = array( - XML_SERIALIZER_OPTION_INDENT, - XML_SERIALIZER_OPTION_LINEBREAKS, - XML_SERIALIZER_OPTION_TYPEHINTS, - XML_SERIALIZER_OPTION_XML_DECL_ENABLED, - XML_SERIALIZER_OPTION_XML_ENCODING, - XML_SERIALIZER_OPTION_DEFAULT_TAG, - XML_SERIALIZER_OPTION_CLASSNAME_AS_TAGNAME, - XML_SERIALIZER_OPTION_ATTRIBUTE_KEY, - XML_SERIALIZER_OPTION_ATTRIBUTE_TYPE, - XML_SERIALIZER_OPTION_ATTRIBUTE_CLASS, - XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES, - XML_SERIALIZER_OPTION_PREPEND_ATTRIBUTES, - XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES, - XML_SERIALIZER_OPTION_MODE, - XML_SERIALIZER_OPTION_DOCTYPE_ENABLED, - XML_SERIALIZER_OPTION_DOCTYPE, - XML_SERIALIZER_OPTION_ROOT_NAME, - XML_SERIALIZER_OPTION_ROOT_ATTRIBS, - XML_SERIALIZER_OPTION_ATTRIBUTES_KEY, - XML_SERIALIZER_OPTION_CONTENT_KEY, - XML_SERIALIZER_OPTION_COMMENT_KEY, - XML_SERIALIZER_OPTION_TAGMAP, - XML_SERIALIZER_OPTION_ENCODE_FUNC, - XML_SERIALIZER_OPTION_NAMESPACE, - XML_SERIALIZER_OPTION_ENTITIES, - XML_SERIALIZER_OPTION_RETURN_RESULT, - XML_SERIALIZER_OPTION_IGNORE_NULL, - XML_SERIALIZER_OPTION_CDATA_SECTIONS - ); + XML_SERIALIZER_OPTION_INDENT, + XML_SERIALIZER_OPTION_LINEBREAKS, + XML_SERIALIZER_OPTION_TYPEHINTS, + XML_SERIALIZER_OPTION_XML_DECL_ENABLED, + XML_SERIALIZER_OPTION_XML_ENCODING, + XML_SERIALIZER_OPTION_DEFAULT_TAG, + XML_SERIALIZER_OPTION_CLASSNAME_AS_TAGNAME, + XML_SERIALIZER_OPTION_ATTRIBUTE_KEY, + XML_SERIALIZER_OPTION_ATTRIBUTE_TYPE, + XML_SERIALIZER_OPTION_ATTRIBUTE_CLASS, + XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES, + XML_SERIALIZER_OPTION_PREPEND_ATTRIBUTES, + XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES, + XML_SERIALIZER_OPTION_MODE, + XML_SERIALIZER_OPTION_DOCTYPE_ENABLED, + XML_SERIALIZER_OPTION_DOCTYPE, + XML_SERIALIZER_OPTION_ROOT_NAME, + XML_SERIALIZER_OPTION_ROOT_ATTRIBS, + XML_SERIALIZER_OPTION_ATTRIBUTES_KEY, + XML_SERIALIZER_OPTION_CONTENT_KEY, + XML_SERIALIZER_OPTION_COMMENT_KEY, + XML_SERIALIZER_OPTION_TAGMAP, + XML_SERIALIZER_OPTION_ENCODE_FUNC, + XML_SERIALIZER_OPTION_NAMESPACE, + XML_SERIALIZER_OPTION_ENTITIES, + XML_SERIALIZER_OPTION_RETURN_RESULT, + XML_SERIALIZER_OPTION_IGNORE_NULL, + XML_SERIALIZER_OPTION_CDATA_SECTIONS, + ); /** - * default options for the serialization + * Default options for the serialization * * @access private * @var array @@ -497,18 +498,18 @@ // prepend string for attributes XML_SERIALIZER_OPTION_PREPEND_ATTRIBUTES => '', - // indent the attributes, if set to '_auto', + // indent the attributes, if set to '_auto', // it will indent attributes so they all start at the same column XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES => false, - // use XML_SERIALIZER_MODE_SIMPLEXML to use parent name as tagname + // use XML_SERIALIZER_MODE_SIMPLEXML to use parent name as tagname // if transforming an indexed array XML_SERIALIZER_OPTION_MODE => XML_SERIALIZER_MODE_DEFAULT, // add a doctype declaration XML_SERIALIZER_OPTION_DOCTYPE_ENABLED => false, - // supply a string or an array with id and uri + // supply a string or an array with id and uri // ({@see XML_Util::getDoctypeDeclaration()} XML_SERIALIZER_OPTION_DOCTYPE => null, @@ -521,13 +522,13 @@ // all values in this key will be treated as attributes XML_SERIALIZER_OPTION_ATTRIBUTES_KEY => null, - // this value will be used directly as content, - // instead of creating a new tag, may only be used + // this value will be used directly as content, + // instead of creating a new tag, may only be used // in conjuction with attributesArray XML_SERIALIZER_OPTION_CONTENT_KEY => null, - // this value will be used directly as comment, - // instead of creating a new tag, may only be used + // this value will be used directly as comment, + // instead of creating a new tag, may only be used // in conjuction with attributesArray XML_SERIALIZER_OPTION_COMMENT_KEY => null, @@ -554,7 +555,7 @@ ); /** - * options for the serialization + * Options for the serialization * * @access public * @var array @@ -562,7 +563,7 @@ var $options = array(); /** - * current tag depth + * Current tag depth * * @access private * @var integer @@ -570,7 +571,7 @@ var $_tagDepth = 0; /** - * serilialized representation of the data + * Serialized representation of the data * * @access private * @var string @@ -578,11 +579,10 @@ var $_serializedData = null; /** - * constructor + * Constructor * * @param mixed $options array containing options for the serialization * - * @return void * @access public */ function XML_Serializer( $options = null ) @@ -596,11 +596,11 @@ } /** - * return API version + * Return the package version number * - * @access public + * @access public * @static - * @return string $version API version + * @return string the version number of XML_Serializer */ function apiVersion() { @@ -608,11 +608,10 @@ } /** - * reset all options to default options + * Reset all options to default options * * @return void * @access public - * @see setOption(), XML_Serializer() */ function resetOptions() { @@ -620,17 +619,16 @@ } /** - * set an option + * Set an option * - * You can use this method if you do not want - * to set all options in the constructor + * You can use this method if you do not want + * to set all options in the constructor. * * @param string $name option name * @param mixed $value option value * * @return void * @access public - * @see resetOption(), XML_Serializer() */ function setOption($name, $value) { @@ -638,16 +636,15 @@ } /** - * sets several options at once + * Sets several options at once * - * You can use this method if you do not want - * to set all options in the constructor + * You can use this method if you do not want + * to set all options in the constructor. * * @param array $options options array * * @return void * @access public - * @see resetOption(), XML_Unserializer(), setOption() */ function setOptions($options) { @@ -662,6 +659,9 @@ * * @return boolean true on success, pear error on failure * @access public + * @uses XML_Util::getDoctypeDeclaration() + * @uses XML_Util::getXMLDeclaration() + * @internal uses error suppression "@settype()" */ function serialize($data, $options = null) { @@ -669,7 +669,7 @@ // of the previously defined ones if (is_array($options)) { $optionsBak = $this->options; - if (isset($options['overrideOptions']) + if (isset($options['overrideOptions']) && $options['overrideOptions'] == true ) { $this->options = array_merge($this->_defaultOptions, $options); @@ -684,11 +684,11 @@ $this->_tagDepth = 0; $rootAttributes = $this->options[XML_SERIALIZER_OPTION_ROOT_ATTRIBS]; - if (isset($this->options[XML_SERIALIZER_OPTION_NAMESPACE]) + if (isset($this->options[XML_SERIALIZER_OPTION_NAMESPACE]) && is_array($this->options[XML_SERIALIZER_OPTION_NAMESPACE]) ) { $rootAttributes['xmlns:' - . $this->options[XML_SERIALIZER_OPTION_NAMESPACE][0]] = + . $this->options[XML_SERIALIZER_OPTION_NAMESPACE][0]] = $this->options[XML_SERIALIZER_OPTION_NAMESPACE][1]; } @@ -701,7 +701,7 @@ $tagName = 'array'; } - $this->_serializedData .= + $this->_serializedData .= $this->_serializeArray($data, $tagName, $rootAttributes); } elseif (is_object($data)) { // serialize an object @@ -710,7 +710,7 @@ } else { $tagName = get_class($data); } - $this->_serializedData .= + $this->_serializedData .= $this->_serializeObject($data, $tagName, $rootAttributes); } else { $tag = array(); @@ -732,8 +732,8 @@ // add doctype declaration if ($this->options[XML_SERIALIZER_OPTION_DOCTYPE_ENABLED] === true) { - $this->_serializedData = - XML_Util::getDoctypeDeclaration($tagName, + $this->_serializedData = + XML_Util::getDoctypeDeclaration($tagName, $this->options[XML_SERIALIZER_OPTION_DOCTYPE]) . $this->options[XML_SERIALIZER_OPTION_LINEBREAKS] . $this->_serializedData; @@ -742,7 +742,7 @@ // build xml declaration if ($this->options[XML_SERIALIZER_OPTION_XML_DECL_ENABLED]) { $atts = array(); - $this->_serializedData = XML_Util::getXMLDeclaration('1.0', + $this->_serializedData = XML_Util::getXMLDeclaration('1.0', $this->options[XML_SERIALIZER_OPTION_XML_ENCODING]) . $this->options[XML_SERIALIZER_OPTION_LINEBREAKS] . $this->_serializedData; @@ -771,7 +771,7 @@ { if ($this->_serializedData == null) { return $this->raiseError('No serialized data available. ' - . 'Use XML_Serializer::serialize() first.', + . 'Use XML_Serializer::serialize() first.', XML_SERIALIZER_ERROR_NO_SERIALIZATION); } return $this->_serializedData; @@ -816,6 +816,10 @@ * @return string $string serialized data * @access private * @uses XML_Util::isValidName() to check, whether key has to be substituted + * @uses XML_Util::replaceEntities() + * @uses XML_Util::createComment() + * @uses PEAR::popExpect() + * @uses PEAR::expectError() */ function _serializeArray(&$array, $tagName = null, $attributes = array()) { @@ -826,7 +830,7 @@ if ($this->options[XML_SERIALIZER_OPTION_COMMENT_KEY] !== null) { if (isset($array[$this->options[XML_SERIALIZER_OPTION_COMMENT_KEY]]) ) { - $_comment = + $_comment = $array[$this->options[XML_SERIALIZER_OPTION_COMMENT_KEY]]; unset($array[$this->options[XML_SERIALIZER_OPTION_COMMENT_KEY]]); } @@ -838,7 +842,7 @@ if ($this->options[XML_SERIALIZER_OPTION_ATTRIBUTES_KEY] !== null) { if (isset($array[$this->options[XML_SERIALIZER_OPTION_ATTRIBUTES_KEY]]) ) { - $attributes = + $attributes = $array[$this->options[XML_SERIALIZER_OPTION_ATTRIBUTES_KEY]]; unset($array[$this->options[XML_SERIALIZER_OPTION_ATTRIBUTES_KEY]]); } @@ -848,7 +852,7 @@ if ($this->options[XML_SERIALIZER_OPTION_CONTENT_KEY] !== null) { if (isset($array[$this->options[XML_SERIALIZER_OPTION_CONTENT_KEY]]) ) { - $_content = + $_content = XML_Util::replaceEntities($array [$this->options[XML_SERIALIZER_OPTION_CONTENT_KEY]]); unset($array[$this->options[XML_SERIALIZER_OPTION_CONTENT_KEY]]); @@ -868,8 +872,8 @@ * if mode is set to simpleXML, check whether * the array is associative or indexed */ - if (is_array($array) && !empty($array) - && $this->options[XML_SERIALIZER_OPTION_MODE] + if (is_array($array) && !empty($array) + && $this->options[XML_SERIALIZER_OPTION_MODE] == XML_SERIALIZER_MODE_SIMPLEXML ) { $indexed = true; @@ -880,8 +884,8 @@ } } - if ($indexed - && $this->options[XML_SERIALIZER_OPTION_MODE] + if ($indexed + && $this->options[XML_SERIALIZER_OPTION_MODE] == XML_SERIALIZER_MODE_SIMPLEXML ) { $string = ''; @@ -890,11 +894,11 @@ $string .= $this->options[XML_SERIALIZER_OPTION_LINEBREAKS]; // do indentation - if ($this->options[XML_SERIALIZER_OPTION_INDENT]!==null + if ($this->options[XML_SERIALIZER_OPTION_INDENT]!==null && $this->_tagDepth>0 ) { - $string .= - str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], + $string .= + str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], $this->_tagDepth); } } @@ -903,11 +907,11 @@ } $scalarAsAttributes = false; - if (is_array($this->options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES]) + if (is_array($this->options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES]) && isset($this->options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES] [$tagName]) ) { - $scalarAsAttributes = + $scalarAsAttributes = $this->options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES][$tagName]; } elseif ($this->options[XML_SERIALIZER_OPTION_SCALAR_AS_ATTRIBUTES] === true ) { @@ -952,10 +956,10 @@ $tmp = $_content . $this->options[XML_SERIALIZER_OPTION_LINEBREAKS]; foreach ($array as $key => $value) { // do indentation - if ($this->options[XML_SERIALIZER_OPTION_INDENT]!==null + if ($this->options[XML_SERIALIZER_OPTION_INDENT]!==null && $this->_tagDepth>0 ) { - $tmp .= str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], + $tmp .= str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], $this->_tagDepth); } @@ -966,7 +970,7 @@ $valid = XML_Util::isValidName($key); $this->popExpect(); if (PEAR::isError($valid)) { - if ($this->options[XML_SERIALIZER_OPTION_CLASSNAME_AS_TAGNAME] + if ($this->options[XML_SERIALIZER_OPTION_CLASSNAME_AS_TAGNAME] && is_object($value) ) { $key = get_class($value); @@ -982,10 +986,10 @@ $atts = array(); if ($this->options[XML_SERIALIZER_OPTION_TYPEHINTS] === true) { - $atts[$this->options[XML_SERIALIZER_OPTION_ATTRIBUTE_TYPE]] = + $atts[$this->options[XML_SERIALIZER_OPTION_ATTRIBUTE_TYPE]] = gettype($value); if ($key !== $origKey) { - $atts[$this->options[XML_SERIALIZER_OPTION_ATTRIBUTE_KEY]] = + $atts[$this->options[XML_SERIALIZER_OPTION_ATTRIBUTE_KEY]] = (string)$origKey; } } @@ -999,10 +1003,10 @@ } $this->_tagDepth--; - if ($this->options[XML_SERIALIZER_OPTION_INDENT]!==null + if ($this->options[XML_SERIALIZER_OPTION_INDENT]!==null && $this->_tagDepth>0 ) { - $tmp .= str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], + $tmp .= str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], $this->_tagDepth); } @@ -1029,10 +1033,10 @@ if (!is_null($_comment)) { $string .= XML_Util::createComment($_comment); $string .= $this->options[XML_SERIALIZER_OPTION_LINEBREAKS]; - if ($this->options[XML_SERIALIZER_OPTION_INDENT]!==null + if ($this->options[XML_SERIALIZER_OPTION_INDENT]!==null && $this->_tagDepth>0 ) { - $string .= str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], + $string .= str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], $this->_tagDepth); } } @@ -1134,10 +1138,10 @@ // build fully qualified tag name if ($this->options[XML_SERIALIZER_OPTION_NAMESPACE] !== null) { if (is_array($this->options[XML_SERIALIZER_OPTION_NAMESPACE])) { - $tag['qname'] = $this->options[XML_SERIALIZER_OPTION_NAMESPACE][0] + $tag['qname'] = $this->options[XML_SERIALIZER_OPTION_NAMESPACE][0] . ':' . $tag['qname']; } else { - $tag['qname'] = $this->options[XML_SERIALIZER_OPTION_NAMESPACE] + $tag['qname'] = $this->options[XML_SERIALIZER_OPTION_NAMESPACE] . ':' . $tag['qname']; } } @@ -1145,7 +1149,7 @@ // attribute indentation if ($this->options[XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES] !== false) { $multiline = true; - $indent = str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], + $indent = str_repeat($this->options[XML_SERIALIZER_OPTION_INDENT], $this->_tagDepth); if ($this->options[XML_SERIALIZER_OPTION_INDENT_ATTRIBUTES] == '_auto') { @@ -1175,14 +1179,14 @@ $replaceEntities = $this->options[XML_SERIALIZER_OPTION_ENTITIES]; } } else { - // this is a nested call, so value is already encoded + // this is a nested call, so value is already encoded // and must not be encoded again $replaceEntities = XML_SERIALIZER_ENTITIES_NONE; // but attributes need to be encoded anyways // (done here because the rest of the code assumes the same encoding // can be used both for attributes and content) foreach ($tag['attributes'] as $k => &$v) { - $v = XML_Util::replaceEntities($v, + $v = XML_Util::replaceEntities($v, $this->options[XML_SERIALIZER_OPTION_ENTITIES]); } } @@ -1195,13 +1199,13 @@ $tag['attributes'] = array_map($this-> options[XML_SERIALIZER_OPTION_ENCODE_FUNC], $tag['attributes']); } - $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, + $tag = XML_Util::createTagFromArray($tag, $replaceEntities, $multiline, $indent, $this->options[XML_SERIALIZER_OPTION_LINEBREAKS]); } elseif (is_array($tag['content'])) { - $tag = $this->_serializeArray($tag['content'], $tag['qname'], + $tag = $this->_serializeArray($tag['content'], $tag['qname'], $tag['attributes']); } elseif (is_object($tag['content'])) { - $tag = $this->_serializeObject($tag['content'], $tag['qname'], + $tag = $this->_serializeObject($tag['content'], $tag['qname'], $tag['attributes']); } elseif (is_resource($tag['content'])) { settype($tag['content'], 'string'); @@ -1211,7 +1215,7 @@ options[XML_SERIALIZER_OPTION_ENCODE_FUNC], $tag['content']); } $tag['attributes'] = array_map($this-> - options[XML_SERIALIZER_OPTION_ENCODE_FUNC], + options[XML_SERIALIZER_OPTION_ENCODE_FUNC], $tag['attributes']); } $tag = XML_Util::createTagFromArray($tag, $replaceEntities);
« previous php.pear.cvs (#56050) next »