public function getField(string $name): FieldInterface
    {
        if (!$this->hasField($name)) {
            throw new DefinitionException("Field '$name' is not defined.");
        }

        return $this->fields[$name];
    }
public function getField(string $name): FieldInterface
    {
        if (!$this->hasField($name)) {
            throw new DefinitionException("Field '$name' is not defined.");
        }

        return $this->fields[$name];
    }
public function getField ( string $ name ) : FieldInterface { if ( ! $ this -> hasField ( $ name ) ) { throw new DefinitionException ( "Field '$name' is not defined." ) ; } return $ this -> fields [ $ name ] ; }
Returns the field for the given name.

@param string $name

@return FieldInterface
Returns the field for the given name .