public function __get($name) { return !array_key_exists($name, $this->fields) ? null : $this->fields[$name]; }