• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/engine/access/loadlimiter.php
  • Класс: BitrixRestEngineAccessLoadLimiter
  • Вызов: LoadLimiter::is
static function is($entityType, $entity, $method): bool
{
	if (
		!static::isActive()
		|| !in_array($entityType, static::$limitedEntityTypes, true)
		|| in_array($method, static::$ignoreMethod, true)
	)
	{
		return false;
	}

	$totalTime = static::getRestTime($entityType, $entity, $method);
	if ($totalTime > static::getLimitTime())
	{
		if (Loader::includeModule('bitrix24') && function_exists('saveRestStat'))
		{
			saveRestStat(static::getDomain(), $entityType, $entity, $method, $totalTime);
		}

		return true;
	}

	return false;
}