1 | <?php |
||
24 | class ValidationException extends ParameterJuicerException |
||
25 | { |
||
26 | /** @var array contains all the set’s exceptions */ |
||
27 | private $exceptions = []; |
||
28 | |||
29 | /** |
||
30 | * addMessage |
||
31 | * |
||
32 | * Add a new message to the exception. |
||
33 | */ |
||
34 | public function addException(string $field, ValidationException $exception): self |
||
40 | |||
41 | /** |
||
42 | * hasExceptions |
||
43 | * |
||
44 | * Indicates if yes or no some exceptions have been set. |
||
45 | */ |
||
46 | public function hasExceptions(): bool |
||
50 | |||
51 | /** |
||
52 | * getExceptions |
||
53 | * |
||
54 | * Return the list of exceptions. |
||
55 | */ |
||
56 | public function getExceptions(): array |
||
60 | |||
61 | /** |
||
62 | * getFancyMessage |
||
63 | * |
||
64 | * Output a nicely formatted validation error messages. |
||
65 | */ |
||
66 | public function getFancyMessage(): string |
||
70 | |||
71 | /** |
||
72 | * getSubFancyMessage |
||
73 | * |
||
74 | * Subrouting to display validation errors. |
||
75 | */ |
||
76 | public function getSubFancyMessage(int $level = 0): string |
||
104 | |||
105 | /** |
||
106 | * __toString |
||
107 | * |
||
108 | * String representation of this exception. |
||
109 | */ |
||
110 | public function __toString(): string |
||
114 | } |
||
115 |