/** * Create the XML based on the locale items. * * @return void */ private function createXML() { // create XML $xmlOutput = BackendLocaleModel::createXMLForExport($this->locale); // xml headers $headers[] = 'Content-Disposition: attachment; filename="locale_' . BackendModel::getUTCDate('d-m-Y') . '.xml"'; $headers[] = 'Content-Type: application/octet-stream;charset=utf-8'; $headers[] = 'Content-Length: ' . strlen($xmlOutput); // set headers SpoonHTTP::setHeaders($headers); // output XML echo $xmlOutput; // stop script exit; }