@param string $fieldName

@return int

@throws \InvalidArgumentException
162537
private function getColumnIndex(NodeElement $table, $fieldName)
    {
        $rows = $table->findAll('css', 'tr');
        Assert::notEmpty($rows, 'There are no rows!');

        /** @var NodeElement $headerRow */
        $headerRow = $rows[0];
        $headers = $headerRow->findAll('css', 'th,td');

        /** @var NodeElement $column */
        foreach ($headers as $index => $column) {
            $columnFieldName = $this->getColumnFieldName($column);
            if ($fieldName === $columnFieldName) {
                return $index;
            }
        }

        throw new \InvalidArgumentException(sprintf('Column with name "%s" not found!', $fieldName));
    }
809956
public function isFieldIndexed($fieldName)
    {
        $indexes = $this->getIndexInfo();
        foreach ($indexes as $index) {
            if (isset($index['key']) && isset($index['key'][$fieldName])) {
                return true;
            }
        }
        return false;
    }
990335
private function getListViewConfigurationValue($fieldName)
    {
        if (empty($fieldName)) {
            throw new \InvalidArgumentException('$fieldName must not be empty.', 1331489528);
        }

        if (!isset($this->conf['listView.'])
            || !isset($this->conf['listView.'][$fieldName])
        ) {
            return '';
        }

        return $this->conf['listView.'][$fieldName];
    }
850783
private function getOldFieldName($modelName, $fieldName)
    {
        $modelRenamedFields = ArrayHelper::getValue(
            $this->renamedFields,
            $modelName,
            []
        );
        if ($modelRenamedFields) {
            $fieldName = ArrayHelper::getValue(
                $modelRenamedFields,
                $fieldName,
                $fieldName
            );
        }

        return $fieldName;
    }
247909
public function removeFilterByFieldName($fieldName)
    {
        return $this->removeFilterByFunction(
            function($key, $query) use ($fieldName) {
                $queryString = $query->getQuery();
                $storedFieldName = substr($queryString,0, strpos($queryString, ":"));
                return $storedFieldName == $fieldName;
            }
        );
    }
927365
public function getFieldLabel($fieldName)
    {
        $result = $this->getField($fieldName, 'label_'.$this->locale, $this->getField($fieldName, 'label'));

        if ($result === null && array_key_exists($fieldName, $this->standardFieldLabels)) {
            $result = $this->standardFieldLabels[$fieldName];
        }

        if ($result === null) {
            $result = $fieldName;
        }

        return $result;
    }
611844
private function countFiles($fieldName = null)
    {
        $finder = new Finder();
        $finder->files()->in($this->getFilePath($fieldName));
        return count($finder);
    }
1059644
public function input($fieldName)
    {
        if ($this->isMethod('post')) {
            return (isset($_POST[$fieldName])) ? $_POST[$fieldName] : '';
        }

        if ($this->isMethod('get')) {
            return (isset($_GET[$fieldName])) ? $_GET[$fieldName] : '';
        }

        if ($this->isMethod('put')) {
            parse_str(file_get_contents("php://input"), $PUT);

            return (isset($PUT[$fieldName])) ? $PUT[$fieldName] : '';
        }

        if ($this->isMethod('patch')) {
            parse_str(file_get_contents("php://input"), $PATCH);

            return (isset($PATCH[$fieldName])) ? $PATCH[$fieldName] : '';
        }

        if ($this->isMethod('delete')) {
            parse_str(file_get_contents("php://input"), $DELETE);

            return (isset($DELETE[$fieldName])) ? $DELETE[$fieldName] : '';
        }
    }
1227795
public function existsByField($fieldName, $key)
    {
        $table = $this->entity->getTable();
        if (!empty($this->with)) {
            $fieldName = $this->getTableAlias($table) . '.' . $fieldName;
        }

        $this->manager->commit();

        $rowCount = $this->getSelectQuery($table, $fieldName, $fieldName, [$key])
                         ->query($this->parameters)
                         ->rowCount();

        return $rowCount !== 0;
    }
281159
public function & GetField ($fieldName = '') {
		$result = NULL;
		if (isset($this->fields[$fieldName]))
			$result = & $this->fields[$fieldName];
		return $result;
	}
240780
public function increment($fieldName, $value = 1)
    {
        parent::set($fieldName, (int) $this->get($fieldName) + $value);

        if ($this->getId()) {
            $this->operator->increment($fieldName, $value);
        }


        return $this;
    }
966448
public function getField($fieldName) {
        $fields = $this->_get_fields();
        if (isset($fields[$fieldName])) {
            return  $fields[$fieldName];
        } else {
            throw new \Exception('Поле "'.$fieldName.'" не найдено');
        }
    }
1085791
final public static function name(string $fieldName) : FieldLabelBuilder
    {
        $labelBuilder       = new FieldLabelBuilder();
        $labelBuilder->name = $fieldName;

        return $labelBuilder;
    }
1132829
public function count($field = '*')
    {
        $r = 0;
        foreach ($this->queries as $query) {
            $t = $query->count($field);
            $r += $t;
        }

        return $r;
    }
335226
public function readRef($fieldName)
    {
        $oRef = $this->readNestedAttribute($fieldName);
        if (!\MongoDBRef::isRef($oRef)) {
            throw new InvalidReferenceException();
        }
        if (isset($this->dbRefs) && isset($this->dbRefs[$fieldName])) {
            $modelInstance = $this->instantiateModel($this->dbRefs[$fieldName]);
        } else if ($this->getDI()->has('mongoMapper')) {
            $modelInstance = $this->getDI()->get('mongoMapper')->resolveModel($oRef['$ref']);
        } else {
            return $oRef;
        }
        return forward_static_call(array($modelInstance, 'findById'), $oRef['$id']);
    }
836800
protected function _getFieldLongName($fieldName)
    {
        //trying to avoid strpos call as often as possible
        $coreTableName = $this->getCoreTableName();
        if ($fieldName[2] == $coreTableName[2] && strpos($fieldName, $coreTableName . '__') === 0) {
            return $fieldName;
        }

        return $coreTableName . '__' . strtolower($fieldName);
    }
1120503
public function getFieldName(int $fieldNum): string
    {
        if (0 > $fieldNum || $this->getFieldCount() <= $fieldNum) {
            throw new \Error(\sprintf('No field with index %d in result', $fieldNum));
        }

        return \pg_field_name($this->handle, $fieldNum);
    }