Find model type in morph mappings registry.

@param string $modelType
@return string

@throws \Cog\Contracts\Love\Reactable\Exceptions\ReactableInvalid
12825
private function findModelTypeInMorphMap(
        string $modelType
    ): string {
        $morphMap = Relation::morphMap();

        if (!isset($morphMap[$modelType])) {
            throw ReactableInvalid::classNotExists($modelType);
        }

        return $morphMap[$modelType];
    }
1167520
public function map($formType)
    {
        $this->mapping = array_merge(array($formType => 'string'), $this->mapping);

        return $this->mapping[$formType];
    }
627386
public function isValidObject($objectType)
    {
        //====================================================================//
        // Verify Result in Cache
        if (isset($this->ValidLocalObject[$objectType])) {
            return $this->ValidLocalObject[$objectType];
        }

        $this->ValidLocalObject[$objectType] = false;

        //====================================================================//
        // Verify Local Core Class Exist & Is Valid
        if (!$this->isValidLocalClass()) {
            return false;
        }
        //====================================================================//
        // Check if Object Manager is NOT Overriden
        if (!(Splash::local() instanceof ObjectsProviderInterface)) {
            //====================================================================//
            // Verify Object File Exist & is Valid
            if (!$this->isValidObjectFile($objectType)) {
                return false;
            }
        }
        //====================================================================//
        // Verify Object Class Exist & is Valid
        if (!$this->isValidObjectClass($objectType)) {
            return false;
        }

        $this->ValidLocalObject[$objectType] = true;

        return true;
    }
795062
protected function getAllowedTypeString($modelKey)
    {
        switch ($modelKey) {
            case 'addressable':
                return implode(",", array_keys(config('combine-core.validation.polymorphicTypes.addressable')));
            case 'author':
                return implode(",", array_keys(config('combine-core.validation.authorTypes')));
            case 'noteable':
                return implode(",", array_keys(config('combine-core.validation.polymorphicTypes.noteable')));
            case 'phoneable':
                return implode(",", array_keys(config('combine-core.validation.polymorphicTypes.phoneable')));
        };
        return null;
    }
1232149
protected function checkModelType($model)
    {
        if (is_string($model)) {
            return $this->getTable($model);
        } elseif (is_object($model)) {
            return $this->getTable(get_class($model));
        }
    }
1171463
public function find($modelitemId)
    {
        $this->model = $this->model->findOrFail($modelitemId);

        return $this->model;
    }
106701
private function getPhpType(string $doctrineType): ?string
    {
        switch ($doctrineType) {
            case DBALType::SMALLINT:
            case DBALType::INTEGER:
                return Type::BUILTIN_TYPE_INT;

            case DBALType::FLOAT:
                return Type::BUILTIN_TYPE_FLOAT;

            case DBALType::BIGINT:
            case DBALType::STRING:
            case DBALType::TEXT:
            case DBALType::GUID:
            case DBALType::DECIMAL:
                return Type::BUILTIN_TYPE_STRING;

            case DBALType::BOOLEAN:
                return Type::BUILTIN_TYPE_BOOL;

            case DBALType::BLOB:
            case 'binary':
                return Type::BUILTIN_TYPE_RESOURCE;

            case DBALType::OBJECT:
                return Type::BUILTIN_TYPE_OBJECT;
        }

        return null;
    }
1000936
public function getParamType($fieldType)
	{
		$fieldType = strtolower($fieldType);
		return isset($this->paramType[$fieldType]) ? $this->paramType[$fieldType] : PDO::PARAM_STR;
	}
587676
private function getPhpType(string $doctrineType): ?string
    {
        switch ($doctrineType) {
            case MongoDbType::INTEGER:
            case MongoDbType::INT:
            case MongoDbType::INTID:
            case MongoDbType::KEY:
                return Type::BUILTIN_TYPE_INT;
            case MongoDbType::FLOAT:
                return Type::BUILTIN_TYPE_FLOAT;
            case MongoDbType::STRING:
            case MongoDbType::ID:
            case MongoDbType::OBJECTID:
            case MongoDbType::TIMESTAMP:
            case MongoDbType::BINDATA:
            case MongoDbType::BINDATABYTEARRAY:
            case MongoDbType::BINDATACUSTOM:
            case MongoDbType::BINDATAFUNC:
            case MongoDbType::BINDATAMD5:
            case MongoDbType::BINDATAUUID:
            case MongoDbType::BINDATAUUIDRFC4122:
                return Type::BUILTIN_TYPE_STRING;
            case MongoDbType::BOOLEAN:
            case MongoDbType::BOOL:
                return Type::BUILTIN_TYPE_BOOL;
        }

        return null;
    }
791904
public function entityGetAttrType($demAttrType)
    {
        $result = MageType::COL_TEXT;
        $type = key($demAttrType);
        $typeData = reset($demAttrType);
        switch ($type) {
            case DemType::ATTR_BINARY:
                $result = MageType::COL_BLOB;
                break;
            case DemType::ATTR_BOOLEAN:
                $result = MageType::COL_BOOLEAN;
                break;
            case DemType::ATTR_DATETIME:
                $result = MageType::COL_TIMESTAMP;
                break;
            case DemType::ATTR_INTEGER:
                $result = MageType::COL_INTEGER;
                if (isset($typeData[Cfg::SUBTYPE])) {
                    if ($typeData[Cfg::SUBTYPE] == DemType::ATTRSUB_SMALL_INT) {
                        $result = MageType::COL_SMALLINT;
                    }
                }
                break;
            case DemType::ATTR_NUMERIC:
                $result = MageType::COL_DECIMAL;
                break;
            case DemType::ATTR_OPTION:
                $result = MageType::COL_TEXT;
                break;
            case DemType::ATTR_TEXT:
                $result = MageType::COL_TEXT;
                break;
        }
        return $result;
    }
160129
protected function getPropertyType($type)
    {
        $propertyType = ucfirst($type);
        if (isset(self::$_propertyTypes[$type])) {
            $propertyType = self::$_propertyTypes[$type];
        }

        return $propertyType;
    }
1103854
public static function getColumnTypeByMetadataType($metadata_type)
    {
        if (!array_key_exists($metadata_type, self::$mapper)) {
            $mt = $metadata_type;
            throw new Exception\InvalidArgumentException(__METHOD__ . " Cannot map the metadata type '$mt' to a column model type");
        }

        return ColumnType::createType(self::$mapper[$metadata_type]);
    }
763521
public function setModelType($modelType)
    {
        if ($modelType < self::MODELTYPE_ENTITY || $modelType > self::MODELTYPE_VALUEOBJECT) {
            throw new \InvalidArgumentException('"' . $modelType . '" is an invalid model type.', 1212519195);
        }
        $this->modelType = $modelType;
    }
69940
protected function _checkFieldType($modelFieldName = null) {
		if (empty($modelFieldName) || !is_string($modelFieldName)) {
			return false;
		}

		if (strpos($modelFieldName, '.') === false) {
			return false;
		}

		list($modelName, $fieldName) = pluginSplit($modelFieldName);
		$schema = $this->_getSchemaForModel($modelName);
		if (($schema === null) || !is_array($schema) || !isset($schema[$fieldName]['type']) ||
			!in_array($schema[$fieldName]['type'], ['text', 'string'])) {
			return false;
		}

		return true;
	}
1130687
protected function getDataType($type, $columnType)
    {
        $map = Config::dataTypeMap();

        if (in_array($columnType, ['bit', 'tinyint(1)'])) {
            return 'boolean';
        }

        if (!array_key_exists($type, $map)) {
            throw new Exception("The type " . $type . " is not mapped in the 'eloquent_type_to_method' key in the config file.");
        }

        return $map[$type];
    }
294766
public function getDomainForType($mappingType)
    {
        if (!isset($this->schemaDomainMap[$mappingType])) {
            throw new EngineException(sprintf('Cannot map unknown Propel type %s to native database type.', var_export($mappingType, true)));
        }

        return $this->schemaDomainMap[$mappingType];
    }
396983
public static Map<String, String> computeModelColumnMappings(Class<?> modelType) {
        return MODEL_COLUMN_MAPPINGS.computeIfAbsent(modelType, model -> {
            List<Field> fields = computeModelFields(model);
            return fields.stream()
                    .collect(toMap(AnimaCache::getColumnName, Field::getName));
        });
    }