Prepare a mongodb field name and convert the PHP property names to MongoDB field names.

@param string $fieldName
@return string
514670
public function prepareFieldName($fieldName)
    {
        list($fieldName) = $this->prepareQueryElement($fieldName, null, null, false);

        return $fieldName;
    }
571200
public function getLocalizedFieldName($fieldName)
    {
        if ($this->isLocalizedField($fieldName) || $this->isLocalizedRelation($fieldName)) {
            return self::localized_field($fieldName);
        }
        trigger_error("Field '$fieldName' is not a localized field", E_USER_ERROR);
    }
1229039
public function getColumnName($fieldName)
    {
        return isset($this->columnNames[$fieldName]) ?
                $this->columnNames[$fieldName] : $fieldName;
    }
894486
public function getFieldMapping($fieldName)
    {
        if (!$this->hasField($fieldName)) {
            throw MappingException::fieldNotFound($this->name, $fieldName);
        }

        return $this->mappings[$fieldName];
    }
1177653
public function exclude($fieldName = null)
    {
        if ( ! isset($this->query['select'])) {
            $this->query['select'] = array();
        }

        $fieldNames = is_array($fieldName) ? $fieldName : func_get_args();

        foreach ($fieldNames as $fieldName) {
            $this->query['select'][$fieldName] = 0;
        }

        return $this;
    }
564907
public function name($fieldName)
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");
        } else {
            //====================================================================//
            // Update New Field structure
            $this->new->name = $fieldName;
            if (empty($this->new->desc)) {
                $this->description($fieldName);
            }
        }

        return $this;
    }
1252615
public function getFieldName($defaultName)
    {
        if (is_array($defaultName)) {
            return $this->getFieldNames($defaultName);
        }

        if (isset($this->renamemap[$defaultName])) {
            return $this->renamemap[$defaultName];
        }

        return $defaultName;
    }
1362970
public function getName($arrayName = null)
    {
        if ($arrayName === null) {
            $arrayName = $this->arrayName;
        }

        if ($arrayName) {
            return $arrayName.'['.implode('][', HtmlHelper::nameToArray($this->fieldName)).']';
        }

        return $this->fieldName;
    }
1115270
public function unsetField($fieldName)
    {
        if (!$this->has($fieldName)) {
            return $this;
        }

        parent::unsetField($fieldName);

        if ($this->getId()) {
            $this->operator->unsetField($fieldName);
        }

        return $this;
    }
152632
public function getFieldBc($fieldName)
    {
        if (array_key_exists($fieldName, $this->bcFields)) {
            return $this->bcFields[$fieldName];
        }

        return $fieldName;
    }
1214352
protected function toText($fieldName)
    {
        $fieldName = $this->camelize($fieldName);
        $fieldName = str_replace('_', ' ', $fieldName);

        return ucfirst($fieldName);
    }
406056
public static function listName($listFieldName)
    {
        //====================================================================//
        // Decode
        $result = self::isListField($listFieldName);
        if (empty($result)) {
            return false;
        }
        //====================================================================//
        // Return List Name
        return   $result['listname'];
    }
738298
public function getFieldByPropertyName(string $propertyName): ?FieldMetadataInterface
    {
        foreach ($this->fieldsMetadata as $fieldMetadata) {
            if ($propertyName === $fieldMetadata->getPropertyName()) {
                return $fieldMetadata;
            }
        }

        return null;
    }
1224592
public static function getFieldKey($fieldName, $fieldId)
    {
        if (isset(get_field_objects($fieldId)[$fieldName]['key'])) {
            return get_field_objects($fieldId)[$fieldName]['key'];
        }

        return false;
    }
507996
public function encode(string $fieldName, string $key = null): string
    {
        $propertyName = sprintf(
            '%s:%s',
            $this->prefix,
            $fieldName
        );

        if (null !== $key) {
            $propertyName .= '-' . $key;
        }


        return $propertyName;
    }
781444
public function setFieldName($fieldName)
    {
        if (!is_string($fieldName) || $fieldName === '') {
            throw new InvalidArgumentException('"Field name" argument must be a string and must not empty.');
        }

        $this->fieldName = $fieldName;

        return $this;
    }
640584
private function fieldNameToUpperCamelCase(string $fieldName) : string
    {
        $handler = function ($matches) {
            return strtoupper($matches[0][1]);
        };
        $result = (string) preg_replace_callback('#\\_[a-zA-Z]#', $handler, $fieldName);
        $result = ucfirst($result);

        return $result;
    }