You are here

public function AddClassesToCachePass::process in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/DependencyInjection/AddClassesToCachePass.php \Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass::process()

You can modify the container here before it is dumped to PHP code.

Parameters

ContainerBuilder $container:

Overrides CompilerPassInterface::process

File

vendor/symfony/http-kernel/DependencyInjection/AddClassesToCachePass.php, line 35

Class

AddClassesToCachePass
Sets the classes to compile in the cache for the container.

Namespace

Symfony\Component\HttpKernel\DependencyInjection

Code

public function process(ContainerBuilder $container) {
  $classes = array();
  foreach ($container
    ->getExtensions() as $extension) {
    if ($extension instanceof Extension) {
      $classes = array_merge($classes, $extension
        ->getClassesToCompile());
    }
  }
  $this->kernel
    ->setClassCache(array_unique($container
    ->getParameterBag()
    ->resolveValue($classes)));
}