public function RestfulRateLimitManager::__construct in RESTful 7
Constructor for RestfulRateLimitManager.
Parameters
string $resource: Resource name being checked.
array $plugin: The plugin info array for the rate limit.
\stdClass $account: The identified user account for the request.
Overrides RestfulPluginBase::__construct
File
- plugins/
rate_limit/ RestfulRateLimitManager.php, line 62
Class
- RestfulRateLimitManager
- Contains RestfulRateLimitManager
Code
public function __construct($resource, array $plugin, $account = NULL) {
parent::__construct($plugin);
$this->resource = $resource;
$this
->setPluginInfo($plugin);
$this->account = $account ? $account : drupal_anonymous_user();
}