• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/classes/general/im_rest.php
  • Класс: CIMRestService
  • Вызов: CIMRestService::getLimit
static function getLimit($options = [])
{
	$max = 200;
	$default = 50;

	if (!isset($options['LIMIT']))
	{
		return $default;
	}

	$limit = (int)$options['LIMIT'];
	if ($limit <= 0)
	{
		return $default;
	}

	if ($limit >= $max)
	{
		return $max;
	}

	return $limit;
}