You are here

public function RateLimitManagerInterface::checkRateLimit in RESTful 7.2

Checks if the current request has reached the rate limit.

If the user has reached the limit this method will throw an exception. If not, the hits counter will be updated for subsequent calls. Since the request can match multiple events, the access is only granted if all events are cleared.

Parameters

RequestInterface $request: The request array.

Throws

FloodException if the rate limit has been reached for the current request.

1 method overrides RateLimitManagerInterface::checkRateLimit()
RateLimitManager::checkRateLimit in src/RateLimit/RateLimitManager.php
Checks if the current request has reached the rate limit.

File

src/RateLimit/RateLimitManagerInterface.php, line 44
Contains \Drupal\restful\RateLimit\RateLimitManagerInterface

Class

RateLimitManagerInterface

Namespace

Drupal\restful\RateLimit

Code

public function checkRateLimit(RequestInterface $request);