RateLimitPluginManager.php in RESTful 7.2
File
src/Plugin/RateLimitPluginManager.php
View source
<?php
namespace Drupal\restful\Plugin;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\plug\Util\Module;
class RateLimitPluginManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, \DrupalCacheInterface $cache_backend) {
parent::__construct('Plugin/rate_limit', $namespaces, 'Drupal\\restful\\Plugin\\rate_limit\\RateLimitInterface', '\\Drupal\\restful\\Annotation\\RateLimit');
$this
->setCacheBackend($cache_backend, 'rate_limit_plugins');
$this
->alterInfo('rate_limit_plugin');
}
public static function create($bin = 'cache') {
return new static(Module::getNamespaces(), _cache_get_object($bin));
}
}