src/Search/Framework/Schema.php
public function getFieldByName($name)
    {
        if (!isset($this->_fieldNameMap[$name])) {
            $message = 'Field name "' . $name . '" not associated to this schema.';
            throw new \InvalidArgumentException($message);
        }
        return $this->getField($this->_fieldNameMap[$name]);
    }
public function getFieldByName($name)
    {
        if (!isset($this->_fieldNameMap[$name])) {
            $message = 'Field name "' . $name . '" not associated to this schema.';
            throw new \InvalidArgumentException($message);
        }
        return $this->getField($this->_fieldNameMap[$name]);
    }
public function getFieldByName ( $ name ) { if ( ! isset ( $ this -> _fieldNameMap [ $ name ] ) ) { $ message = 'Field name "' . $ name . '" not associated to this schema.' ; throw new \ InvalidArgumentException ( $ message ) ; } return $ this -> getField ( $ this -> _fieldNameMap [ $ name ] ) ; }
Returns a field by its name as stored in the index.

@param string $name
The name of the field as stored in the index.

@return SchemaField

@throws \InvalidArgumentException()
Returns a field by its name as stored in the index .