我想解析这个结构的配置:
$config = [
'streams' => [
'foo' => [
[
'id' => 'some-identifier',
'type' => 'a',
],
[
'id' => 'some-other-identifier',
'type' => 'b',
],
],
'bar' => ...,
],
];
在这个数组streams
中是一个预定义的键并包含多个任意命名的流的映射。在这种情况下,有两个流被调用foo
和bar
定义。
每个流都有一组处理程序。每个处理程序都是一个具有 2 个属性的映射:id
和type
.
我最终得到:
$rootNode
->children()
->arrayNode('streams')
->prototype('array')
->children()
->end()
->end()
->end()
->end()
;
现在我陷入了下一步的困境。
如果我用英语解释它会是:streams
是地图数组的地图。
使用我的代码,我可以将其表达为“是一张地图”,并且卡住了如何说它是“数组的”。
有什么提示吗?