| 1 | <?php |
||
| 9 | class Error |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @static |
||
| 13 | * |
||
| 14 | * @var array Error messages. |
||
| 15 | */ |
||
| 16 | private static $errors = []; |
||
| 17 | |||
| 18 | |||
| 19 | /** |
||
| 20 | * Get all errors that have been set during the analysis. |
||
| 21 | * |
||
| 22 | * @return array The error messages. |
||
| 23 | */ |
||
| 24 | 31 | public function getErrors() |
|
| 36 | |||
| 37 | |||
| 38 | /** |
||
| 39 | * Add an error message. |
||
| 40 | * |
||
| 41 | * @param string $type The type of error. |
||
| 42 | * @param string $error The error message (or field). |
||
| 43 | * |
||
| 44 | * @return void |
||
| 45 | */ |
||
| 46 | 11 | public function setError($type, $error) |
|
| 54 | } |