The above should finally be mapped to an array that looks like this
(because "id" is the key attribute).
array(
'things' => array(
'option1' => 'foo',
'option2' => 'bar',
)
)
And if only 'value' element is left in the array, it will replace its wrapper array.
The above should finally be mapped to an array that looks like this
(because "id" is the key attribute).
array(
'things' => array(
'option1' => 'value1'
)
)
It's also possible to mix 'value-only' and 'non-value-only' elements in the array.
The above should finally be mapped to an array as follows
array(
'things' => array(
'option1' => 'value1',
'option2' => array(
'value' => 'value2',
'foo' => 'foo2'
)
)
)
The 'value' element can also be ArrayNode:
The above should be finally be mapped to an array as follows
array(
'things' => array(
'option1' => array(
'foo' => 'foo1',
'bar' => 'bar1'
)
)
)
If using VariableNode for value node, it's also possible to mix different types of value nodes:
The above should be finally mapped to an array as follows
array(
'things' => array(
'option1' => array(
'foo' => 'foo1',
'bar' => 'bar1'
),
'option2' => 'value2'
)
)