public function toArray() { $row = array(); foreach ($this->fields as $field) { $row[$field->getName()] = $field->getValue(); } return $row; }