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