| 1 | <?php |
||
| 19 | class Xml extends AbstractWriter |
||
| 20 | { |
||
| 21 | /** |
||
| 22 | * {@inheritdoc} |
||
| 23 | * Writes an array to a Xml string. |
||
| 24 | */ |
||
| 25 | 6 | public function toString($config, $pretty = true) |
|
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | 3 | public static function getSupportedExtensions() |
|
| 47 | |||
| 48 | /** |
||
| 49 | * Converts array to XML string. |
||
| 50 | * @param array $arr Array to be converted |
||
| 51 | * @param string $rootElement I specified will be taken as root element |
||
| 52 | * @param SimpleXMLElement $xml If specified content will be appended |
||
| 53 | * |
||
| 54 | * @return string Converted array as XML |
||
| 55 | * |
||
| 56 | * @see https://www.kerstner.at/2011/12/php-array-to-xml-conversion/ |
||
| 57 | */ |
||
| 58 | 9 | protected function toXML(array $arr, $rootElement = '<config/>', $xml = null) |
|
| 73 | } |
||
| 74 |
When comparing two booleans, it is generally considered safer to use the strict comparison operator.