/**
* Отдает составные части sitemap
*
* @return void
*/
function sitemapChunkToOutput($chunk)
{
$app = \RS\Application\Application::getInstance();
$chunk_file = $this->getChunkFilepath($chunk);
if (file_exists($chunk_file)) {
$content_type = $this->gzip ? 'application/x-gzip' : 'text/xml';
$app->headers
->addHeader('Content-Type', $content_type)
->sendHeaders();
readfile($chunk_file);
} else {
$app->showException(404, t('Файл не найден'));
}
}