@@ 229-233 (lines=5) @@ | ||
226 | */ |
|
227 | public function addError($key, $message, $group = null) |
|
228 | { |
|
229 | if (null !== $group) { |
|
230 | $this->errors[$group][$key][] = $message; |
|
231 | } else { |
|
232 | $this->errors[$key][] = $message; |
|
233 | } |
|
234 | ||
235 | return $this; |
|
236 | } |
|
@@ 435-439 (lines=5) @@ | ||
432 | public function setErrors(array $errors, $key = null, $group = null) |
|
433 | { |
|
434 | if (null !== $group) { |
|
435 | if (null !== $key) { |
|
436 | $this->errors[$group][$key] = $errors; |
|
437 | } else { |
|
438 | $this->errors[$group] = $errors; |
|
439 | } |
|
440 | } elseif (null !== $key) { |
|
441 | $this->errors[$key] = $errors; |
|
442 | } else { |