| @@ 214-224 (lines=11) @@ | ||
| 211 | * @param NodeInterface[] $argumentsObjectTree |
|
| 212 | * @throws Exception |
|
| 213 | */ |
|
| 214 | protected function validateArguments(array $argumentDefinitions, array $argumentsObjectTree) |
|
| 215 | { |
|
| 216 | $additionalArguments = []; |
|
| 217 | foreach ($argumentsObjectTree as $argumentName => $value) { |
|
| 218 | if (!array_key_exists($argumentName, $argumentDefinitions)) { |
|
| 219 | $additionalArguments[$argumentName] = $value; |
|
| 220 | } |
|
| 221 | } |
|
| 222 | $this->abortIfRequiredArgumentsAreMissing($argumentDefinitions, $argumentsObjectTree); |
|
| 223 | $this->uninitializedViewHelper->validateAdditionalArguments($additionalArguments); |
|
| 224 | } |
|
| 225 | ||
| 226 | /** |
|
| 227 | * Throw an exception if required arguments are missing |
|
| @@ 154-164 (lines=11) @@ | ||
| 151 | * @param NodeInterface[]|mixed[] $arguments |
|
| 152 | * @throws Exception |
|
| 153 | */ |
|
| 154 | protected function validateParsedArguments(array $arguments) |
|
| 155 | { |
|
| 156 | $additionalArguments = []; |
|
| 157 | $argumentDefinitions = $this->prepareArguments(); |
|
| 158 | foreach ($arguments as $argumentName => $value) { |
|
| 159 | if (!array_key_exists($argumentName, $argumentDefinitions)) { |
|
| 160 | $additionalArguments[$argumentName] = $value; |
|
| 161 | } |
|
| 162 | } |
|
| 163 | $this->validateAdditionalArguments($additionalArguments); |
|
| 164 | } |
|
| 165 | ||
| 166 | /** |
|
| 167 | * Creates arguments by padding with missing+optional arguments |
|