public static function render(array $input, array $options = array()) { $options = array_merge(array('version' => '1.0', 'encoding' => 'UTF-8', 'trim' => true, 'depth' => 10), $options); $Instance = new ArrayToXml($input, $options['depth'], $options['trim']); return $Instance->toXml($options['version'], $options['encoding']); }
public function sendXml($data, $rootName = 'data') { $xml = new ArrayToXml($rootName); $this->data = $xml->toXml($data); $this->_sendResponse(true, 'application/xml'); }