22 $this->checkType($value);
35 public function add(array $errors)
37 foreach ($errors as $error)
62 foreach ($result->getErrorMessages() as $message)
64 $errors[] =
new Error($message);
77 return (
bool)
count($this);
85 public function getErrorsByCode($code)
88 foreach($this->values as $error)
91 if($error->getCode() == $code)
108 foreach($this->values as $error)
111 if($error->getCode() == $code)
130 $this->checkType($value);
131 parent::offsetSet($offset, $value);
138 private function checkType($value)
140 if(!$value instanceof
Error)