| 1 | <?php |
||
| 2 | namespace Ackintosh\Snidel; |
||
| 3 | |||
| 4 | class Error implements \ArrayAccess |
||
| 5 | { |
||
| 6 | /** #var array */ |
||
| 7 | private $errors = array(); |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @param mixed $offset |
||
| 11 | * @return bool |
||
| 12 | */ |
||
| 13 | public function offsetExists($offset) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param mixed $offset |
||
| 24 | * @return mixed |
||
| 25 | */ |
||
| 26 | public function offsetGet($offset) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param mixed $offset |
||
| 37 | * @return void |
||
| 38 | */ |
||
| 39 | public function offsetSet($offset, $value) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param mixed $offset |
||
| 46 | * @return void |
||
| 47 | */ |
||
| 48 | public function offsetUnset($offset) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return bool |
||
| 55 | */ |
||
| 56 | public function exists() |
||
| 57 | { |
||
| 58 | return count($this->errors) > 0; |
||
| 59 | } |
||
| 61 |