public function ProjectExtension::load in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectExtension.php \ProjectExtension::load()
Loads a specific configuration.
Parameters
array $config An array of configuration values:
ContainerBuilder $container A ContainerBuilder instance:
Throws
\InvalidArgumentException When provided tag is not defined in this extension
Overrides ExtensionInterface::load
File
- vendor/
symfony/ dependency-injection/ Tests/ Fixtures/ includes/ ProjectExtension.php, line 9
Class
Code
public function load(array $configs, ContainerBuilder $configuration) {
$config = call_user_func_array('array_merge', $configs);
$configuration
->setDefinition('project.service.bar', new Definition('FooClass'));
$configuration
->setParameter('project.parameter.bar', isset($config['foo']) ? $config['foo'] : 'foobar');
$configuration
->setDefinition('project.service.foo', new Definition('FooClass'));
$configuration
->setParameter('project.parameter.foo', isset($config['foo']) ? $config['foo'] : 'foobar');
return $configuration;
}