public function ContainerBuilder::compile in Service Container 7.2
Same name in this branch
- 7.2 src/DependencyInjection/ContainerBuilder.php \Drupal\service_container\DependencyInjection\ContainerBuilder::compile()
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::compile()
Same name and namespace in other branches
- 7 src/DependencyInjection/ContainerBuilder.php \Drupal\service_container\DependencyInjection\ContainerBuilder::compile()
Compiles the container builder to a new container.
Return value
\Drupal\service_container\DependencyInjection\ContainerInterface The newly constructed container.
Overrides ContainerBuilderInterface::compile
File
- src/
DependencyInjection/ ContainerBuilder.php, line 103 - Contains \Drupal\service_container\DependencyInjection\ContainerBuilder
Class
- ContainerBuilder
- ContainerBuilder retrieves container definitions from service providers to build a Container.
Namespace
Drupal\service_container\DependencyInjectionCode
public function compile() {
$definition = $this
->getContainerDefinition();
if (!empty($definition['services']['service_container']['class'])) {
$this->containerClass = $definition['services']['service_container']['class'];
}
return new $this->containerClass($definition);
}