我有一个容器:
$newContainer = new ContainerBuilder();
我加载了一些参数:
$loader = new YamlFileLoader($newContainer, new FileLocator(__DIR__.'/../Resources/config/newFolder'));
$loader->load('newParameters.yml');
我的容器看起来像这样:
[parameters:protected] => Array
(
[exampleKey => Array
(
[parameter] => something value
[anotherParameter] => another value
)
)
现在我进行合并:
$container->merge($newContainer);
我的合并看起来像这样 - print_r($container):
[parameters:protected] => Array
(
[existing] => Array
(
...
)
[existing2] => Array
(
...
)
[exampleKey => Array
(
[parameter] => something value
[anotherParameter] => another value
)
[existing3] => Array
(
...
)
)
如何合并我的容器所以我有这个??:
[parameters:protected] => Array
(
[existing] => Array
(
...
)
[existing2] => Array
(
...
[exampleKey => Array
(
[parameter] => something value
[anotherParameter] => another value
)
)
[existing3] => Array
(
...
)
)
请帮忙...