Skip to content

Commit

Permalink
Adding documentation for new xml options. Adding a default setting to…
Browse files Browse the repository at this point in the history
… fix all the E_NOTICE errors triggered in [503b7cf]

Fixes #284
  • Loading branch information
markstory committed Oct 2, 2010
1 parent 503b7cf commit 36737e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cake/libs/xml.php
Expand Up @@ -852,6 +852,9 @@ class Xml extends XmlNode {
* 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().
* - 'slug': A boolean to indicate whether or not you want the string version of the XML document
* to have its tags run through Inflector::slug(). Defaults to true
*
* @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.
Expand All @@ -861,7 +864,8 @@ class Xml extends XmlNode {
function __construct($input = null, $options = array()) {
$defaults = array(
'root' => '#document', 'tags' => array(), 'namespaces' => array(),
'version' => '1.0', 'encoding' => 'UTF-8', 'format' => 'attributes'
'version' => '1.0', 'encoding' => 'UTF-8', 'format' => 'attributes',
'slug' => true
);
$options = array_merge($defaults, Xml::options(), $options);

Expand Down

0 comments on commit 36737e6

Please sign in to comment.