| 1 | <?php |
||
| 17 | final class ValidationException extends RestException |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Violations |
||
| 21 | * |
||
| 22 | * @var FormErrorIterator |
||
| 23 | */ |
||
| 24 | private $errors; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor |
||
| 28 | * |
||
| 29 | * @param FormErrorIterator $errors Errors from form |
||
| 30 | * @param string $message Error message |
||
| 31 | */ |
||
| 32 | public function __construct(FormErrorIterator $errors, $message = 'Validation failed') |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return FormErrorIterator |
||
| 40 | */ |
||
| 41 | public function getErrors() |
||
| 45 | } |
||
| 46 |