• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/Sitemap/File/Base.php
  • Класс: BitrixSeoSitemapFilefor
  • Вызов: for::__construct
public function __construct($fileName, $settings)
{
	$this->settings = [
		'SITE_ID' => $settings['SITE_ID'],
		'PROTOCOL' => $settings['PROTOCOL'] == 'https' ? 'https' : 'http',
		'DOMAIN' => $settings['DOMAIN'],
	];

	$site = SiteTable::getRow(["filter" => ["LID" => $this->settings['SITE_ID']]]);

	$this->documentRoot = SiteTable::getDocumentRoot($this->settings['SITE_ID']);
	$this->footerClosed = false;

	$this->siteRoot = Path::combine(
		$this->documentRoot,
		$site['DIR']
	);
	
	$fileName = $this->prepareFileName($fileName);
	$this->partFile = $this->partFile ?: $fileName;
	$this->pathPhysical = null; // hack for object reconstuct during file splitting
	parent::__construct($this->siteRoot.'/'.$fileName, $this->settings['SITE_ID']);
	$this->partChanged = $this->isExists() && !$this->isSplitNeeded();
}