Returns the db specific domain for a propelType.

@param string $propelType the Propel type name.

@return Domain          The db specific domain.
@throws EngineException
357301
public function getDomainForType($propelType)
    {
        if (!isset($this->schemaDomainMap[$propelType])) {
            throw new EngineException("Cannot map unknown Propel type " . var_export($propelType, true) . " to native database type.");
        }

        return $this->schemaDomainMap[$propelType];
    }
1139699
public static function getTypeInstance($type)
	{
		$type = ucfirst(strtolower($type));
		if (!isset(self::$instances[$type])) {
			$class = 'JFusion\\Api\\Platform\\' . $type;
			self::$instances[$type] = new $class();
		}
		return self::$instances[$type];
	}
755631
public static function getType($type)
    {
        if (!isset(static::$mappedTypeInstances[$type])) {
            if (!static::hasType($type)) {
                throw TypeException::typeDoesNotExist($type);
            }

            static::$mappedTypeInstances[$type] = new static::$mappedTypeClasses[$type]();
        }

        return static::$mappedTypeInstances[$type];
    }
749804
public function getDoctrineTypeMapping($dbType)
    {
        if ($this->doctrineTypeMapping === null) {
            $this->initializeAllDoctrineTypeMappings();
        }

        $dbType = strtolower($dbType);

        if (! isset($this->doctrineTypeMapping[$dbType])) {
            throw new DBALException('Unknown database type ' . $dbType . ' requested, ' . static::class . ' may not support it.');
        }

        return $this->doctrineTypeMapping[$dbType];
    }
1224252
public static function getEngineType()
    {
        $container = self::getContainer();
        $builder = CollectionBuilder::create($container, new EngineTasks());

        return $container->get('projectXEngine')
            ->setBuilder($builder);
    }
160129
protected function getPropertyType($type)
    {
        $propertyType = ucfirst($type);
        if (isset(self::$_propertyTypes[$type])) {
            $propertyType = self::$_propertyTypes[$type];
        }

        return $propertyType;
    }
312370
protected function _loadFromDb($iType)
    {
        $sSql = $this->_getSQLByType($iType);
        $aData = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sSql);

        return $aData;
    }
114076
protected function getServer(string $serverType): string
    {
        if (in_array($serverType, array_keys(config('swoole.servers')), true)) {
            return config("swoole.servers.{$serverType}.driver");
        }

        throw new DomainException("The server type: [{$serverType}] not found");
    }
839800
protected function getPrimaryDomain($domain)
    {
        /** @var \Rcm\Entity\Domain $domain */
        $domain = $this->_em->getRepository(\Rcm\Entity\Domain::class)
            ->findOneBy(['domain' => $domain]);

        if (empty($domain)) {
            return null;
        }

        $primary = $domain->getPrimary();

        if (!$primary->getPrimary()) {
            return $primary;
        }

        return $this->getPrimaryDomain($primary->getDomainName());
    }
1077881
private function validateType(string $type): string
    {
        if ('' === $type) {
            throw new \DomainException(sprintf('A type name may not be empty'));
        }

        if ((int) $type) {
            throw new \DomainException(sprintf('A type name may not start with a number. Found %s', $type));
        }

        if (\in_array($type, static::getValidTypes(), true)) {
            // Scalar.
            return $type;
        }

        if ('\\' === $type[0] || ctype_upper($type[0])) {
            // Class.
            return $type;
        }

        throw new \DomainException(sprintf('The type %s is not supported for code generation', $type));
    }
778908
private function getTypeFromRegistry(string $type, bool $isEntityId): Type
    {
        if ($this->types->isEntity($type) && $isEntityId) {
            return $this->types->getId($type);
        }

        if ($this->types->isEntity($type) && !$isEntityId) {
            return $this->types->getOutput($type);
        }

        return $this->types->get($type);
    }
452830
public function getModifyTableDDL(PropelTableDiff $tableDiff)
    {
        $ret = '';

        // drop indices, foreign keys
        if ($tableDiff->hasModifiedPk()) {
            $ret .= $this->getDropPrimaryKeyDDL($tableDiff->getFromTable());
        }
        foreach ($tableDiff->getRemovedFks() as $fk) {
            $ret .= $this->getDropForeignKeyDDL($fk);
        }
        foreach ($tableDiff->getModifiedFks() as $fkName => $fkModification) {
            list($fromFk, $toFk) = $fkModification;
            $ret .= $this->getDropForeignKeyDDL($fromFk);
        }
        foreach ($tableDiff->getRemovedIndices() as $index) {
            $ret .= $this->getDropIndexDDL($index);
        }
        foreach ($tableDiff->getModifiedIndices() as $indexName => $indexModification) {
            list($fromIndex, $toIndex) = $indexModification;
            $ret .= $this->getDropIndexDDL($fromIndex);
        }

        // alter table structure
        foreach ($tableDiff->getRenamedColumns() as $columnRenaming) {
            $ret .= $this->getRenameColumnDDL($columnRenaming[0], $columnRenaming[1]);
        }
        if ($modifiedColumns = $tableDiff->getModifiedColumns()) {
            $ret .= $this->getModifyColumnsDDL($modifiedColumns);
        }
        if ($addedColumns = $tableDiff->getAddedColumns()) {
            $ret .= $this->getAddColumnsDDL($addedColumns);
        }
        foreach ($tableDiff->getRemovedColumns() as $column) {
            $ret .= $this->getRemoveColumnDDL($column);
        }

        // add new indices and foreign keys
        if ($tableDiff->hasModifiedPk()) {
            $ret .= $this->getAddPrimaryKeyDDL($tableDiff->getToTable());
        }
        foreach ($tableDiff->getModifiedIndices() as $indexName => $indexModification) {
            list($fromIndex, $toIndex) = $indexModification;
            $ret .= $this->getAddIndexDDL($toIndex);
        }
        foreach ($tableDiff->getAddedIndices() as $index) {
            $ret .= $this->getAddIndexDDL($index);
        }
        foreach ($tableDiff->getModifiedFks() as $fkName => $fkModification) {
            list($fromFk, $toFk) = $fkModification;
            $ret .= $this->getAddForeignKeyDDL($toFk);
        }
        foreach ($tableDiff->getAddedFks() as $fk) {
            $ret .= $this->getAddForeignKeyDDL($fk);
        }

        return $ret;
    }
104222
protected function _getPropertyType(Zend_Reflection_Property $prop)
    {
        $docBlock = $prop->getDocComment();

        if (!$docBlock) {
            return 'Unknown';
        }

        if (!$docBlock->hasTag('var')) {
            return 'Unknown';
        }

        $tag = $docBlock->getTag('var');
        return trim($tag->getDescription());
    }
17684
public function getPhinxType($sqlTypeDef)
    {
        if (!preg_match('/^([\w]+)(\(([\d]+)*(,([\d]+))*\))*$/', $sqlTypeDef, $matches)) {
            throw new \RuntimeException('Column type ' . $sqlTypeDef . ' is not supported');
        }

        $limit = null;
        $precision = null;
        $type = $matches[1];
        if (count($matches) > 2) {
            $limit = $matches[3] ?: null;
        }
        if (count($matches) > 4) {
            $precision = $matches[5];
        }
        switch ($matches[1]) {
            case 'varchar':
                $type = static::PHINX_TYPE_STRING;
                if ($limit === 255) {
                    $limit = null;
                }
                break;
            case 'char':
                $type = static::PHINX_TYPE_CHAR;
                if ($limit === 255) {
                    $limit = null;
                }
                if ($limit === 36) {
                    $type = static::PHINX_TYPE_UUID;
                }
                break;
            case 'int':
                $type = static::PHINX_TYPE_INTEGER;
                if ($limit === 11) {
                    $limit = null;
                }
                break;
            case 'bigint':
                if ($limit === 11) {
                    $limit = null;
                }
                $type = static::PHINX_TYPE_BIG_INTEGER;
                break;
            case 'blob':
                $type = static::PHINX_TYPE_BINARY;
                break;
        }
        if ($type === 'tinyint') {
            if ($matches[3] === 1) {
                $type = static::PHINX_TYPE_BOOLEAN;
                $limit = null;
            }
        }

        $this->getSqlType($type);

        return [
            'name' => $type,
            'limit' => $limit,
            'precision' => $precision,
        ];
    }
363603
public function getModifyDatabaseDDL(PropelDatabaseDiff $databaseDiff)
    {
        $ret = $this->getBeginDDL();

        foreach ($databaseDiff->getRemovedTables() as $table) {
            $ret .= $this->getDropTableDDL($table);
        }

        foreach ($databaseDiff->getRenamedTables() as $fromTableName => $toTableName) {
            $ret .= $this->getRenameTableDDL($fromTableName, $toTableName);
        }

        foreach ($databaseDiff->getAddedTables() as $table) {
            $ret .= $this->getAddTableDDL($table);
            $ret .= $this->getAddIndicesDDL($table);
        }

        foreach ($databaseDiff->getModifiedTables() as $tableDiff) {
            $ret .= $this->getModifyTableDDL($tableDiff);
        }

        foreach ($databaseDiff->getAddedTables() as $table) {
            $ret .= $this->getAddForeignKeysDDL($table);
        }

        $ret .= $this->getEndDDL();

        return $ret;
    }
20117
protected function _getSQLByType($iType)
    {
        $sSQLAdd = '';
        $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb();
        $sSQLType = " AND `oxtype` = " . $oDb->quote($iType);

        if ($iType == self::TYPE_CATEGORY_MENU) {
            $sSQLAdd = " AND `oxcatid` IS NOT NULL AND `oxsnippet` = '0'";
        }

        if ($iType == self::TYPE_SERVICE_LIST) {
            $sIdents = implode(", ", \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quoteArray($this->getServiceKeys()));
            $sSQLAdd = " AND OXLOADID IN (" . $sIdents . ")";
            $sSQLType = '';
        }
        $sViewName = $this->getBaseObject()->getViewName();
        $sSql = "SELECT * FROM {$sViewName} WHERE `oxactive` = '1' $sSQLType AND `oxshopid` = " . $oDb->quote($this->_sShopID) . " $sSQLAdd ORDER BY `oxloadid`";

        return $sSql;
    }
729386
protected function _getInheritanceTypeString($type)
    {
        switch ($type) {
            case ClassMetadataInfo::INHERITANCE_TYPE_NONE:
                return 'NONE';

            case ClassMetadataInfo::INHERITANCE_TYPE_JOINED:
                return 'JOINED';

            case ClassMetadataInfo::INHERITANCE_TYPE_SINGLE_TABLE:
                return 'SINGLE_TABLE';

            case ClassMetadataInfo::INHERITANCE_TYPE_TABLE_PER_CLASS:
                return 'PER_CLASS';
        }
    }