public function setRow($id = null, array $values = []) { $errors = $this->validateRow($values); if (!empty($errors)) { return false; } $this->data[(int) $id] = $values; return true; }