You are here

public function RateLimitDecoratedResource::process in RESTful 7.2

Controller function that passes the data along and executes right action.

Return value

array An structured array with the response data.

Throws

\Drupal\restful\Exception\NotImplementedException If no controller can be found.

\Drupal\restful\Exception\ForbiddenException If access is denied for the operation.

Overrides ResourceDecoratorBase::process

File

src/Plugin/resource/Decorators/RateLimitDecoratedResource.php, line 74
Contains \Drupal\restful\Plugin\resource\Decorators\RateLimitDecoratedResource

Class

RateLimitDecoratedResource
Class RateLimitDecoratedResource.

Namespace

Drupal\restful\Plugin\resource\Decorators

Code

public function process() {

  // This will throw the appropriate exception if needed.
  $this
    ->getRateLimitManager()
    ->checkRateLimit($this
    ->getRequest());
  return $this->subject
    ->process();
}