You are here

public function RestfulRateLimitBase::__construct in RESTful 7

Constructor.

Parameters

array $plugin_info: Plugin definition sub-array.

\RestfulEntityBase $resource: The resource this object is limiting access to.

1 call to RestfulRateLimitBase::__construct()
RestfulRateLimitGlobal::__construct in plugins/rate_limit/RestfulRateLimitGlobal.class.php
Constructor.
1 method overrides RestfulRateLimitBase::__construct()
RestfulRateLimitGlobal::__construct in plugins/rate_limit/RestfulRateLimitGlobal.class.php
Constructor.

File

plugins/rate_limit/RestfulRateLimitBase.php, line 46
Contains \RestfulRateLimitBase

Class

RestfulRateLimitBase
@file Contains \RestfulRateLimitBase

Code

public function __construct(array $plugin_info, $resource = NULL) {
  $this->period = $plugin_info['period'];
  $this->limits = $plugin_info['limits'];
  $this->name = $plugin_info['event'];
  $this->resource = $resource;
}