interface RateLimitManagerInterface in RESTful 7.2
Hierarchy
- interface \Drupal\restful\RateLimit\RateLimitManagerInterface
Expanded class hierarchy of RateLimitManagerInterface
All classes that implement RateLimitManagerInterface
File
- src/
RateLimit/ RateLimitManagerInterface.php, line 13 - Contains \Drupal\restful\RateLimit\RateLimitManagerInterface
Namespace
Drupal\restful\RateLimitView source
interface RateLimitManagerInterface {
/**
* Set the account.
*
* @param object $account
*/
public function setAccount($account);
/**
* Get the account.
*
* @return object
* The account object,
*/
public function getAccount();
/**
* 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.
*
* @param RequestInterface $request
* The request array.
*
* @throws FloodException if the rate limit has been reached for the
* current request.
*/
public function checkRateLimit(RequestInterface $request);
/**
* Delete all expired rate limit entities.
*/
public static function deleteExpired();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RateLimitManagerInterface:: |
public | function | Checks if the current request has reached the rate limit. | 1 |
RateLimitManagerInterface:: |
public static | function | Delete all expired rate limit entities. | 1 |
RateLimitManagerInterface:: |
public | function | Get the account. | 1 |
RateLimitManagerInterface:: |
public | function | Set the account. | 1 |