Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Cleaning up doc blocks.

Removing commented out code.
Removing use of a()
  • Loading branch information...
commit ab50bbe5953867d428c3be32ffa34ff0cdb1e372 1 parent 2737062
@markstory markstory authored
Showing with 14 additions and 17 deletions.
  1. +14 −17 cake/libs/xml.php
View
31 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, '?' . '>'))
));
Please sign in to comment.
Something went wrong with that request. Please try again.