1 | <?php |
||
7 | class InputValidationException extends \InvalidArgumentException |
||
8 | { |
||
9 | /** |
||
10 | * Array of messages, should be key value pair of fieldname => message |
||
11 | * |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $messages; |
||
15 | |||
16 | /** |
||
17 | * FormValidationException constructor. |
||
18 | * |
||
19 | * @param array $messages Key/value pairs of fieldname => message. |
||
20 | * @param integer $code Error code. |
||
21 | * @param Exception|null $previous Passed through to Exception. |
||
22 | */ |
||
23 | public function __construct(array $messages = [], $code = 0, Exception $previous = null) |
||
40 | |||
41 | /** |
||
42 | * Get the array of messages |
||
43 | * |
||
44 | * @return array |
||
45 | */ |
||
46 | public function getMessages() |
||
50 | |||
51 | /** |
||
52 | * Get one error message for each field. |
||
53 | * |
||
54 | * @return array |
||
55 | */ |
||
56 | public function getFieldMessages() |
||
75 | } |
||
76 |