| 1 | <?php |
||
| 5 | trait ErrorTrait |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var array |
||
| 9 | */ |
||
| 10 | protected $errors = []; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param string $text |
||
| 14 | * @param null|string $context |
||
| 15 | * |
||
| 16 | * @return void |
||
| 17 | */ |
||
| 18 | protected function addError($text, $context = null) |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @return bool |
||
| 30 | */ |
||
| 31 | public function hasErrors() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return array |
||
| 38 | */ |
||
| 39 | public function getErrors() |
||
| 43 | } |
||
| 44 |