You are here

public function CachedContainerBuilder::__construct in Service Container 7.2

Same name and namespace in other branches
  1. 7 src/DependencyInjection/CachedContainerBuilder.php \Drupal\service_container\DependencyInjection\CachedContainerBuilder::__construct()

Constructs a ContainerBuilder object.

Parameters

PluginManagerInterface $service_provider_manager: The service provider manager that provides the service providers, which define the services used in the container.

\DrupalCacheInterface $cache: The cache bin used to store retrieve the container to/from. To get a cache object use e.g.: $cache = _cache_get_object('cache');

Overrides ContainerBuilder::__construct

File

src/DependencyInjection/CachedContainerBuilder.php, line 51
Contains \Drupal\service_container\DependencyInjection\CachedContainerBuilder

Class

CachedContainerBuilder
CachedContainerBuilder retrieves the container definition from cache or builds it.

Namespace

Drupal\service_container\DependencyInjection

Code

public function __construct(PluginManagerInterface $service_provider_manager, DrupalCacheInterface $cache) {
  $this->cache = $cache;
  parent::__construct($service_provider_manager);
}