From ab50bbe5953867d428c3be32ffa34ff0cdb1e372 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 13 Aug 2009 21:29:33 -0400 Subject: [PATCH] Cleaning up doc blocks. Removing commented out code. Removing use of a() --- cake/libs/xml.php | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/cake/libs/xml.php b/cake/libs/xml.php index 1a204880092..e6efe66a8a1 100644 --- a/cake/libs/xml.php +++ b/cake/libs/xml.php @@ -815,19 +815,19 @@ class Xml extends XmlNode { * Constructor. Sets up the XML parser with options, gives it this object as * its XML object, and sets some variables. * + * ### Options + * - 'root': The name of the root element, defaults to '#document' + * - 'version': The XML version, defaults to '1.0' + * - 'encoding': Document encoding, defaults to 'UTF-8' + * - 'namespaces': An array of namespaces (as strings) used in this document + * - 'format': Specifies the format this document converts to when parsed or + * rendered out as text, either 'attributes' or 'tags', defaults to 'attributes' + * - 'tags': An array specifying any tag-specific formatting options, indexed + * by tag name. See XmlNode::normalize(). * @param mixed $input The content with which this XML document should be initialized. Can be a - * string, array or object. If a string is specified, it may be a literal XML - * document, or a URL or file path to read from. - * @param array $options Options to set up with, valid options are as follows: - * - 'root': The name of the root element, defaults to '#document' - * - 'version': The XML version, defaults to '1.0' - * - 'encoding': Document encoding, defaults to 'UTF-8' - * - 'namespaces': An array of namespaces (as strings) used in this document - * - 'format': Specifies the format this document converts to when parsed or - * rendered out as text, either 'attributes' or 'tags', - * defaults to 'attributes' - * - 'tags': An array specifying any tag-specific formatting options, indexed - * by tag name. See XmlNode::normalize(). + * string, array or object. If a string is specified, it may be a literal XML + * document, or a URL or file path to read from. + * @param array $options Options to set up with, for valid options see above: * @see XmlNode::normalize() */ function __construct($input = null, $options = array()) { @@ -856,9 +856,6 @@ function __construct($input = null, $options = array()) { $Root->append($input, $options); } } - // if (Configure::read('App.encoding') !== null) { - // $this->encoding = Configure::read('App.encoding'); - // } } /** * Initialize XML object from a given XML string. Returns false on error. @@ -900,8 +897,8 @@ function parse() { $this->__initParser(); $this->__rawData = trim($this->__rawData); $this->__header = trim(str_replace( - a('<' . '?', '?' . '>'), - a('', ''), + array('<' . '?', '?' . '>'), + array('', ''), substr($this->__rawData, 0, strpos($this->__rawData, '?' . '>')) ));