Permalink
Browse files

Adding documentation for new xml options. Adding a default setting to…

… fix all the E_NOTICE errors triggered in [503b7cf]

Fixes #284
  • Loading branch information...
1 parent 503b7cf commit 36737e6419eb3c58ee8c0eae98cb8df2b0fbdfe0 @markstory markstory committed Oct 2, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 cake/libs/xml.php
View
@@ -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.
@@ -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);

0 comments on commit 36737e6

Please sign in to comment.