|
@@ 330-335 (lines=6) @@
|
| 327 |
|
$validator = $this->getValidator(); |
| 328 |
|
foreach ($this->operation->getParams() as $name => $schema) { |
| 329 |
|
$value = $this[$name]; |
| 330 |
|
if (!$validator->validate($schema, $value)) { |
| 331 |
|
$errors = array_merge($errors, $validator->getErrors()); |
| 332 |
|
} elseif ($value !== $this[$name]) { |
| 333 |
|
// Update the config value if it changed and no validation errors were encountered |
| 334 |
|
$this->data[$name] = $value; |
| 335 |
|
} |
| 336 |
|
} |
| 337 |
|
|
| 338 |
|
// Validate additional parameters |
|
@@ 347-351 (lines=5) @@
|
| 344 |
|
if (!$this->operation->hasParam($name) && !in_array($name, $hidden)) { |
| 345 |
|
// Always set the name so that error messages are useful |
| 346 |
|
$properties->setName($name); |
| 347 |
|
if (!$validator->validate($properties, $value)) { |
| 348 |
|
$errors = array_merge($errors, $validator->getErrors()); |
| 349 |
|
} elseif ($value !== $this[$name]) { |
| 350 |
|
$this->data[$name] = $value; |
| 351 |
|
} |
| 352 |
|
} |
| 353 |
|
} |
| 354 |
|
} |