@@ 218-222 (lines=5) @@ | ||
215 | */ |
|
216 | public function addError($key, $message, $group = null) |
|
217 | { |
|
218 | if (!empty($group)) { |
|
219 | $this->errors[$group][$key][] = $message; |
|
220 | } else { |
|
221 | $this->errors[$key][] = $message; |
|
222 | } |
|
223 | ||
224 | return $this; |
|
225 | } |
|
@@ 430-434 (lines=5) @@ | ||
427 | public function setErrors(array $errors, $key = null, $group = null) |
|
428 | { |
|
429 | if (!empty($group)) { |
|
430 | if (!empty($key)) { |
|
431 | $this->errors[$group][$key] = $errors; |
|
432 | } else { |
|
433 | $this->errors[$group] = $errors; |
|
434 | } |
|
435 | } elseif (!empty($key)) { |
|
436 | $this->errors[$key] = $errors; |
|
437 | } else { |