• Модуль: security
  • Путь к файлу: ~/bitrix/modules/security/lib/hostrestriction.php
  • Класс: BitrixSecurityHostRestriction
  • Вызов: HostRestriction::save
public function save()
{
	ConfigOption::set('security', $this->optionPrefix.'hosts', $this->hosts, '');
	ConfigOption::set('security', $this->optionPrefix.'action', $this->action, '');
	ConfigOption::set('security', $this->optionPrefix.'action_options', serialize($this->actionOptions), '');
	ConfigOption::set('security', $this->optionPrefix.'logging', $this->isLogNeeded, '');
	if (!is_null($this->isActive))
	{

		if ($this->isActive)
		{
			EventManager::getInstance()
				->registerEventHandler('main', 'OnPageStart', 'security', get_class($this), 'onPageStart');
		}
		else
		{
			EventManager::getInstance()
				->unRegisterEventHandler('main', 'OnPageStart', 'security', get_class($this), 'onPageStart');
		}
	}
	DataCache::createInstance()->clean($this->cacheId, $this->cacheInitPath);

	return $this;
}