Skip to content

Commit

Permalink
Return XML instead of DOMDocument object when using _serialize viewVar
Browse files Browse the repository at this point in the history
See #7897
  • Loading branch information
rlems committed Dec 23, 2015
1 parent cf680a4 commit f187531
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/View/XmlView.php
Expand Up @@ -141,6 +141,9 @@ protected function _serialize($serialize)
$options['pretty'] = true;
}

if(isset($options['return']) && strtolower($options['return']) === 'domdocument') {
return Xml::fromArray($data, $options)->saveXML();
}
return Xml::fromArray($data, $options)->asXML();
}
}

0 comments on commit f187531

Please sign in to comment.