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

	if(is_string($params['CONFIG']))
	{
		$params['CONFIG'] = CUtil::JsObjectToPhp($params['CONFIG']);
	}

	if (!is_array($params['CONFIG']) || empty($params['CONFIG']))
	{
		throw new BitrixRestRestException("New config is not specified", "CONFIG_ERROR", CRestServer::STATUS_WRONG_REQUEST);
	}

	BitrixPullMobileCounter::setConfig($params['CONFIG']);

	return true;
}