public function XMLSitemapWriter::endDocument in XML sitemap 7.2
Same name and namespace in other branches
- 6.2 xmlsitemap.xmlsitemap.inc \XMLSitemapWriter::endDocument()
Document.
File
- ./
xmlsitemap.xmlsitemap.inc, line 227 - XML sitemap integration functions for xmlsitemap.module.
Class
- XMLSitemapWriter
- Extended class for writing XML sitemap files.
Code
public function endDocument() {
$return = parent::endDocument();
if (!$return) {
throw new XMLSitemapGenerationException(t('Unknown error occurred while writing to file @file.', array(
'@file' => $this->uri,
)));
}
// @code
// If (xmlsitemap_var('gz')) {
// $file_gz = $file . '.gz';
// file_put_contents($file_gz, gzencode(file_get_contents($file), 9));
// }
// @endcode
return $return;
}