public function ContainerBuilder::loadFromExtension in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/ContainerBuilder.php \Symfony\Component\DependencyInjection\ContainerBuilder::loadFromExtension()
Loads the configuration for an extension.
Parameters
string $extension The extension alias or namespace:
array $values An array of values that customizes the extension:
Return value
ContainerBuilder The current instance
Throws
BadMethodCallException When this ContainerBuilder is frozen
\LogicException if the container is frozen
File
- vendor/
symfony/ dependency-injection/ ContainerBuilder.php, line 275
Class
- ContainerBuilder
- ContainerBuilder is a DI container that provides an API to easily describe services.
Namespace
Symfony\Component\DependencyInjectionCode
public function loadFromExtension($extension, array $values = array()) {
if ($this
->isFrozen()) {
throw new BadMethodCallException('Cannot load from an extension on a frozen container.');
}
$namespace = $this
->getExtension($extension)
->getAlias();
$this->extensionConfigs[$namespace][] = $values;
return $this;
}