public function getFieldMappingByDbFieldName(string $dbFieldName) : array
    {
        foreach ($this->fieldMappings as $mapping) {
            if ($mapping['name'] === $dbFieldName) {
                return $mapping;
            }
        }

        throw MappingException::mappingNotFoundByDbName($this->name, $dbFieldName);
    }
public function getFieldMappingByDbFieldName(string $dbFieldName) : array
    {
        foreach ($this->fieldMappings as $mapping) {
            if ($mapping['name'] === $dbFieldName) {
                return $mapping;
            }
        }

        throw MappingException::mappingNotFoundByDbName($this->name, $dbFieldName);
    }
public function getFieldMappingByDbFieldName ( string $ dbFieldName ) : array { foreach ( $ this -> fieldMappings as $ mapping ) { if ( $ mapping [ 'name' ] === $ dbFieldName ) { return $ mapping ; } } throw MappingException :: mappingNotFoundByDbName ( $ this -> name , $ dbFieldName ) ; }
Gets the field mapping by its DB name.
E.g. it returns identifier's mapping when called with _id.

@throws MappingException
Gets the field mapping by its DB name . E . g . it returns identifier s mapping when called with _id .