protected function Kernel::dumpContainer

Dumps the service container to PHP code in the cache.

Parameters

ConfigCache $cache The config cache:

ContainerBuilder $container The service container:

string $class The name of the class to generate:

string $baseClass The name of the container's base class:

1 call to Kernel::dumpContainer()
Kernel::initializeContainer in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php
Initializes the service container.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Kernel.php, line 712

Class

Kernel
The Kernel is the heart of the Symfony system.

Namespace

Symfony\Component\HttpKernel

Code

protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container, $class, $baseClass) {

  // cache the container
  $dumper = new PhpDumper($container);
  $content = $dumper
    ->dump(array(
    'class' => $class,
    'base_class' => $baseClass,
  ));
  if (!$this->debug) {
    $content = self::stripComments($content);
  }
  $cache
    ->write($content, $container
    ->getResources());
}