Same filename in this branch
- 10 core/lib/Drupal/Core/Plugin/CachedDiscoveryClearer.php
- 10 core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
- 9 core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
Namespace
Drupal\Core\ProxyClass\Plugin
File
core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
View source
<?php
namespace Drupal\Core\ProxyClass\Plugin;
class CachedDiscoveryClearer implements \Drupal\Core\Plugin\CachedDiscoveryClearerInterface {
use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
protected $drupalProxyOriginalServiceId;
protected $service;
protected $container;
public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $drupal_proxy_original_service_id) {
$this->container = $container;
$this->drupalProxyOriginalServiceId = $drupal_proxy_original_service_id;
}
protected function lazyLoadItself() {
if (!isset($this->service)) {
$this->service = $this->container
->get($this->drupalProxyOriginalServiceId);
}
return $this->service;
}
public function addCachedDiscovery(\Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface $cached_discovery) {
return $this
->lazyLoadItself()
->addCachedDiscovery($cached_discovery);
}
public function clearCachedDefinitions() {
return $this
->lazyLoadItself()
->clearCachedDefinitions();
}
}
Classes