1 | <?php |
||
21 | class ArrayNode extends AbstractNode implements PrototypeNodeInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var NodeInterface[] |
||
25 | */ |
||
26 | protected $children = array(); |
||
27 | |||
28 | /** |
||
29 | * @var bool|null |
||
30 | */ |
||
31 | protected $defaultValueSet = null; |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | public function setName($name) |
||
40 | |||
41 | /** |
||
42 | * Append node. |
||
43 | * |
||
44 | * @param NodeInterface $child |
||
45 | */ |
||
46 | public function append(NodeInterface $child) |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function setDefaultValue($value) |
||
68 | |||
69 | /** |
||
70 | * Get children node default values. |
||
71 | * |
||
72 | * @return array |
||
73 | */ |
||
74 | public function getDefaultValue() |
||
83 | |||
84 | /** |
||
85 | * {@inheritdoc} |
||
86 | */ |
||
87 | public function hasDefaultValue() |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | protected function validateType($value) |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | protected function normalizeValue($value) |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | protected function mergeValues($left, $right) |
||
144 | |||
145 | /** |
||
146 | * {@inheritdoc} |
||
147 | */ |
||
148 | protected function finalizeValue($value) |
||
166 | |||
167 | /** |
||
168 | * Assert if child is required. |
||
169 | * |
||
170 | * @param bool $required |
||
171 | * @param string $name |
||
172 | * |
||
173 | * @throws InvalidConfigurationException |
||
174 | */ |
||
175 | private function assertRequired($required, $name) |
||
185 | |||
186 | /** |
||
187 | * Assert that unrecognized config should be empty. |
||
188 | * |
||
189 | * @param array $value |
||
190 | * |
||
191 | * @throws InvalidConfigurationException |
||
192 | */ |
||
193 | private function assertEmptyUnrecognizedConfig($value) |
||
204 | } |
||
205 |