• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/businesssuite/utils/queueeventhandler.php
  • Класс: BitrixSeoBusinessSuiteUtilsQueueEventHandler
  • Вызов: QueueEventHandler::setEngineCode
private function setEngineCode($code) : self
{
	if(!$this->hasErrors())
	{
		try
		{
			if(is_string($code) && $this->service = ServiceFactory::getServiceByEngineCode($code))
			{
				if($this->service instanceof IInternalService && $this->service::canUseAsInternal())
				{
					$this->engineCode = $code;
					return $this->setType($this->service::getTypeByEngine($this->engineCode));
				}
			}
		}
		catch (Throwable $exception)
		{
			$this->errorCollection->setError(new MainError($exception->getMessage()));
		}
	}
	return $this;
}