Skip to content

Commit

Permalink
[HttpKernel] Allow override of ContainerBuilder instance used to buil…
Browse files Browse the repository at this point in the history
…d container
  • Loading branch information
Drak committed Apr 13, 2012
1 parent b2af6b4 commit 82bbf3b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Symfony/Component/HttpKernel/Kernel.php
Expand Up @@ -640,7 +640,7 @@ protected function buildContainer()
}
}

$container = new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
$container = $this->getContainerBuilder();
$extensions = array();
foreach ($this->bundles as $bundle) {
if ($extension = $bundle->getContainerExtension()) {
Expand Down Expand Up @@ -671,6 +671,16 @@ protected function buildContainer()
return $container;
}

/**
* Gets a new ContainerBuilder instance used to build the service container.
*
* @return ContainerBuilder
*/
protected function getContainerBuilder()
{
return new ContainerBuilder(new ParameterBag($this->getKernelParameters()));
}

/**
* Dumps the service container to PHP code in the cache.
*
Expand Down

0 comments on commit 82bbf3b

Please sign in to comment.