public function getFields($key = NULL) { return isset($this->fields[$key]) ? (array) $this->fields[$key] : (array) $this->fields; }