You are here

public function CachedContainerBuilder::getContainerDefinition in Service Container 7.2

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

Returns the fully build container definition.

Return value

array An associative array with the following keys:

  • parameters: The parameters of the container, simple k/v
  • services: The services of the container.

Overrides ContainerBuilder::getContainerDefinition

See also

\Drupal\service_container\DependencyInjection\ServiceProviderInterface

File

src/DependencyInjection/CachedContainerBuilder.php, line 59
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 getContainerDefinition() {
  $definition = $this
    ->getCache();
  if (!$definition) {
    $definition = parent::getContainerDefinition();
    $this
      ->setCache($definition);
  }
  return $definition;
}