• Модуль: imconnector
  • Путь к файлу: ~/bitrix/modules/imconnector/lib/input.php
  • Класс: Bitrix\ImConnector\Input
  • Вызов: Input::__construct
function __construct(array $params)
{
	$this->result = new Result();
	$this->params = $params;

	if (!empty($this->params['CONNECTOR']))
	{
		$provider = Provider::getProviderForConnectorInput($this->params['CONNECTOR'], $this->params);
		if ($provider->isSuccess())
		{
			/** @var Provider\Base\Input $this->provider */
			$this->provider = $provider->getResult();
		}
		else
		{
			$this->result->addErrors($provider->getErrors());
		}
	}
	else
	{
		$this->result->addError(new Error('Connector id not specified', 'CONNECTOR_ID_NOT_SPECIFIED', __METHOD__, $params));
	}
}