improve docblock with possible values and default

This commit is contained in:
Ceeram 2013-03-13 14:07:47 +01:00
parent b5bac5b80f
commit 2f79894852

View file

@ -150,7 +150,7 @@ class Xml {
* ### Options * ### Options
* *
* - `format` If create childs ('tags') or attributes ('attribute'). * - `format` If create childs ('tags') or attributes ('attribute').
* - `formatOutput` Returns formatted Xml * - `formatOutput` Returns formatted Xml when set to `true`. Defaults to `false`
* - `version` Version of XML document. Default is 1.0. * - `version` Version of XML document. Default is 1.0.
* - `encoding` Encoding of XML document. If null remove from XML header. Default is the some of application. * - `encoding` Encoding of XML document. If null remove from XML header. Default is the some of application.
* - `return` If return object of SimpleXMLElement ('simplexml') or DOMDocument ('domdocument'). Default is SimpleXMLElement. * - `return` If return object of SimpleXMLElement ('simplexml') or DOMDocument ('domdocument'). Default is SimpleXMLElement.
@ -204,7 +204,7 @@ class Xml {
$options = array_merge($defaults, $options); $options = array_merge($defaults, $options);
$dom = new DOMDocument($options['version'], $options['encoding']); $dom = new DOMDocument($options['version'], $options['encoding']);
if ($options['formatOutput'] === true) { if ($options['formatOutput']) {
$dom->formatOutput = true; $dom->formatOutput = true;
} }
self::_fromArray($dom, $dom, $input, $options['format']); self::_fromArray($dom, $dom, $input, $options['format']);