• Модуль: imconnector
  • Путь к файлу: ~/bitrix/modules/imconnector/lib/rest/status.php
  • Класс: BitrixImConnectorRestStatus
  • Вызов: Status::getStatus
static function getStatus($params, $n, CRestServer $server)
	{
		$params = array_change_key_case($params, CASE_UPPER);

		if($server->getAuthType() !== Auth::AUTH_TYPE)
		{
			throw new AuthTypeException("Application context required");
		}

		if(!isset($params['CONNECTOR']))
		{
			throw new ArgumentNullException("CONNECTOR");
		}

		$status = StatusConnector::getInstance($params['CONNECTOR'], (int)$params['LINE']);

		$result = array(
			'LINE' => $status->getLine(),
			'CONNECTOR' => $status->getconnector(),
			'ERROR' => $status->getError(),
			'CONFIGURED' => $status->isConfigured(),
			'STATUS' => $status->isStatus(),
		);

		return $result;
	}