You are here

class RateLimitRequest in RESTful 7.2

Class RateLimitGlobal @package Drupal\restful\Plugin\rate_limit

Plugin annotation


@RateLimit(
  id = "request",
  label = "Any request",
  description = "The basic rate limit plugin. Every call to a resource is counted.",
)

Hierarchy

Expanded class hierarchy of RateLimitRequest

File

src/Plugin/rate_limit/RateLimitRequest.php, line 21
Contains \Drupal\restful\Plugin\rate_limit\RateLimitRequest

Namespace

Drupal\restful\Plugin\rate_limit
View source
class RateLimitRequest extends RateLimit {

  /**
   * {@inheritdoc}
   */
  public function isRequestedEvent(RequestInterface $request) {
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
RateLimit::$limits protected property Array of maximum limit of requests across all endpoints per role.
RateLimit::$period protected property Period after which the rate limit is expired.
RateLimit::$resource protected property The resource this object is limiting access to.
RateLimit::generateIdentifier public function Generates an identifier for the event and the request. Overrides RateLimitInterface::generateIdentifier 1
RateLimit::getLimit public function Get the rate limit. Returns the highest rate limit for the current account. Overrides RateLimitInterface::getLimit 1
RateLimit::getPeriod public function Get the rate limit period. Overrides RateLimitInterface::getPeriod
RateLimit::loadRateLimitEntity public function Load rate limit entity. Overrides RateLimitInterface::loadRateLimitEntity
RateLimit::setLimit public function Set the rate limit. Overrides RateLimitInterface::setLimit
RateLimit::setPeriod public function Set the rate limit period. Overrides RateLimitInterface::setPeriod
RateLimit::__construct public function 1
RateLimitRequest::isRequestedEvent public function Checks if the current request meets the event for the implementing class. Overrides RateLimitInterface::isRequestedEvent