mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-28 14:56:23 +00:00
Adding documentation for new xml options. Adding a default setting to fix all the E_NOTICE errors triggered in [503b7cf5d7
]
Fixes #284
This commit is contained in:
parent
503b7cf5d7
commit
36737e6419
1 changed files with 5 additions and 1 deletions
|
@ -852,6 +852,9 @@ class Xml extends XmlNode {
|
||||||
* rendered out as text, either 'attributes' or 'tags', defaults to 'attributes'
|
* rendered out as text, either 'attributes' or 'tags', defaults to 'attributes'
|
||||||
* - 'tags': An array specifying any tag-specific formatting options, indexed
|
* - 'tags': An array specifying any tag-specific formatting options, indexed
|
||||||
* by tag name. See XmlNode::normalize().
|
* 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
|
* @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
|
* 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.
|
* document, or a URL or file path to read from.
|
||||||
|
@ -861,7 +864,8 @@ class Xml extends XmlNode {
|
||||||
function __construct($input = null, $options = array()) {
|
function __construct($input = null, $options = array()) {
|
||||||
$defaults = array(
|
$defaults = array(
|
||||||
'root' => '#document', 'tags' => array(), 'namespaces' => 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);
|
$options = array_merge($defaults, Xml::options(), $options);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue