• Модуль: imopenlines
  • Путь к файлу: ~/bitrix/modules/imopenlines/lib/connector.php
  • Класс: BitrixImOpenLinesConnector
  • Вызов: Connector::__construct
public function __construct()
{
	$imLoad = Loader::includeModule('im');
	$pullLoad = Loader::includeModule('pull');
	$connectorLoad = Loader::includeModule('imconnector');
	if (
		$imLoad
		&& $pullLoad
		&& $connectorLoad
	)
	{
		$this->result = new Result();
		//old version
		$this->error = new BasicError(null, '', '');
	}
	else
	{
		if (!$imLoad)
		{
			$this->result->addError(new Error(Loc::getMessage('IMOL_CHAT_ERROR_IM_LOAD'), 'IM_LOAD_ERROR', __METHOD__));
			//old version
			$this->error = new BasicError(__METHOD__, 'IM_LOAD_ERROR', Loc::getMessage('IMOL_CHAT_ERROR_IM_LOAD'));
		}
		elseif (!$pullLoad)
		{
			$this->result->addError(new Error(Loc::getMessage('IMOL_CHAT_ERROR_PULL_LOAD'), 'PULL_LOAD_ERROR', __METHOD__));
			//old version
			$this->error = new BasicError(__METHOD__, 'PULL_LOAD_ERROR', Loc::getMessage('IMOL_CHAT_ERROR_PULL_LOAD'));
		}
		elseif (!$connectorLoad)
		{
			$this->result->addError(new Error(Loc::getMessage('IMOL_CHAT_ERROR_CONNECTOR_LOAD'), 'CONNECTOR_LOAD_ERROR', __METHOD__));
			//old version
			$this->error = new BasicError(__METHOD__, 'CONNECTOR_LOAD_ERROR', Loc::getMessage('IMOL_CHAT_ERROR_CONNECTOR_LOAD'));
		}
	}
}