From 36737e6419eb3c58ee8c0eae98cb8df2b0fbdfe0 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 2 Oct 2010 19:20:43 -0400 Subject: [PATCH] Adding documentation for new xml options. Adding a default setting to fix all the E_NOTICE errors triggered in [503b7cf5d73b0b82778a97d3d75207b92480d102] Fixes #284 --- cake/libs/xml.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cake/libs/xml.php b/cake/libs/xml.php index ecbe6a27b..80057cd3d 100644 --- a/cake/libs/xml.php +++ b/cake/libs/xml.php @@ -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);