| 1 | <?php |
||
| 24 | class ValidationException extends ParameterJuicerException |
||
| 25 | { |
||
| 26 | /** @var bool Indicate if messages have been set in the current exception.*/ |
||
| 27 | private $exceptions = []; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * addMessage |
||
| 31 | * |
||
| 32 | * Add a new message to the exception. |
||
| 33 | */ |
||
| 34 | public function addException(ValidationException $exception): self |
||
| 45 | |||
| 46 | /** |
||
| 47 | * hasExceptions |
||
| 48 | * |
||
| 49 | * Indicates if yes or no some exceptions have been set. |
||
| 50 | */ |
||
| 51 | public function hasExceptions(): int |
||
| 55 | |||
| 56 | /** |
||
| 57 | * getExceptions |
||
| 58 | * |
||
| 59 | * Return the list of exceptions. |
||
| 60 | */ |
||
| 61 | public function getExceptions(): array |
||
| 65 | |||
| 66 | /** |
||
| 67 | * getMessages |
||
| 68 | * |
||
| 69 | * Return an array of the embeded exceptions’ messages. |
||
| 70 | */ |
||
| 71 | public function getMessages(): array |
||
| 80 | } |
||
| 81 |