class DepcalcCacheFactory in Dependency Calculation 8
Hierarchy
- class \Drupal\depcalc\Cache\DepcalcCacheFactory implements CacheFactoryInterface
Expanded class hierarchy of DepcalcCacheFactory
1 string reference to 'DepcalcCacheFactory'
1 service uses DepcalcCacheFactory
File
- src/
Cache/ DepcalcCacheFactory.php, line 8
Namespace
Drupal\depcalc\CacheView source
class DepcalcCacheFactory implements CacheFactoryInterface {
/**
* The core cache factory.
*
* @var \Drupal\Core\Cache\CacheFactoryInterface
*/
protected $factory;
/**
* The event dispatcher.
*
* @var \Symfony\Component\EventDispatcher\EventDispatcherInterface
*/
protected $dispatcher;
/**
* DepcalcCacheFactory constructor.
*
* @param \Drupal\Core\Cache\CacheFactoryInterface $factory
* The core cache factory.
*/
public function __construct(CacheFactoryInterface $factory, EventDispatcherInterface $dispatcher) {
$this->factory = $factory;
$this->dispatcher = $dispatcher;
}
/**
* {@inheritdoc}
*/
public function get($bin) {
$backend = $this->factory
->get('depcalc');
return new DepcalcCacheBackend($backend, $this->dispatcher);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DepcalcCacheFactory:: |
protected | property | The event dispatcher. | |
DepcalcCacheFactory:: |
protected | property | The core cache factory. | |
DepcalcCacheFactory:: |
public | function |
Gets a cache backend class for a given cache bin. Overrides CacheFactoryInterface:: |
|
DepcalcCacheFactory:: |
public | function | DepcalcCacheFactory constructor. |