public function getField($name) { if (!isset($this->fields[$name])) { throw new \LogicException("Field {$name} does not exists in mapping"); } return $this->fields[$name]; }