if ($definition->
hasErrors() &&
$e =
$definition->
getErrors()) { throw new RuntimeException(reset($e));
} if ($isConstructorArgument) { $this->loading
[$id] = true;
} try { return $this->
createService($definition,
$inlineServices,
$isConstructorArgument,
$id);
} finally { if ($isConstructorArgument) { unset($this->loading
[$id]);
} } } /**
* Merges a ContainerBuilder with the current ContainerBuilder configuration.
*
* Service definitions overrides the current defined ones.
*
* But for parameters, they are overridden by the current ones. It allows
* the parameters passed to the container constructor to have precedence
* over the loaded ones.
*
* $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar']));
* $loader = new LoaderXXX($container);
* $loader->load('resource_name');
* $container->register('foo', 'stdClass');
*
* In the above example, even if the loaded resource defines a foo
* parameter, the value will still be 'bar' as defined in the ContainerBuilder
* constructor.
*
* @return void
*
* @throws BadMethodCallException When this ContainerBuilder is compiled
*/