Get the regular expression that is used by the given field type
@param integer $checkType Field type
@return string The matching regular expression
321122
public static function getCheck($checkType)
    {
        $strReturn = "";

        if (array_key_exists($checkType, self::$checks)) {
            $strReturn = self::$checks[$checkType];
        }

        return $strReturn;
    }
322698
protected function matchTokenTextAtCursor(int $type)
    {
        $result = preg_match($this->getTokenPattern($type), $this->getTextAtCursor(), $matches);
        PregHelper::assertMatchResult(
            $result,
            RegExpException::class,
            "Failed to match token text due to regular expression error"
        );
        if (1 === $result) {
            $text = $matches[0];
            if (strlen($text) == 0) {
                throw new LengthException("Matched token text is empty");
            }
        } else {
            $text = null;
        }
        return $text;
    }
282716
private static function checkType(string $file): string
    {
        $parts = explode('.', $file);
        $type = array_pop($parts);

        if (!in_array($type, array_keys(self::$types))) {
            throw new LoaderException("Loader::checkType(): Could not find parser for {$file}!");
        }

        return $type;
    }
449210
protected function getCheckSQLDeclaration(Check $check)
    {
        if (!$this->supportChecks()) {
            throw PlatformException::methodNotSupported(__METHOD__);
        }

        return 'CONSTRAINT '.$check->getName().' CHECK ('.$check->getDefinition().')';
    }
66733
private function getTypeHint(string $type, bool $allowNull = null): string
    {
        if (strpos($type, '[]') !== false) {
            $type = 'array';
        }

        if ($allowNull === true) {
            $type = '?' . $type;
        }

        return $type;
    }
859397
private static function getRegex()
    {
        if (self::$regex === null) {
            self::$regex = '/('.str_replace('.', '\\.', implode('|', array_keys(self::$suffixes))).')$/';
        }

        return self::$regex;
    }
1004720
public static function getArrayType(string $type): ?string
    {
        if (substr($type, -2) !== '[]' || strlen($type) === 2) {
            return null;
        }

        return substr($type, 0, -2);
    }
516058
function get_extension($type)
    {
        $type = strtolower($type);
        foreach ($this->mime_types as $ext => $m_type) {
            if ($m_type == $type) return $ext;
        }
        return false;
    }
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;
    }
1000936
public function getParamType($fieldType)
	{
		$fieldType = strtolower($fieldType);
		return isset($this->paramType[$fieldType]) ? $this->paramType[$fieldType] : PDO::PARAM_STR;
	}
1187983
public function type($type)
    {
        if (is_string($type)) {
            $map = array(
                'double' => 1,
                'string' => 2,
                'object' => 3,
                'array' => 4,
                'binary' => 5,
                'undefined' => 6,
                'objectid' => 7,
                'boolean' => 8,
                'date' => 9,
                'null' => 10,
                'regex' => 11,
                'jscode' => 13,
                'symbol' => 14,
                'jscodewithscope' => 15,
                'integer32' => 16,
                'timestamp' => 17,
                'integer64' => 18,
                'maxkey' => 127,
                'minkey' => 255,
            );

            $type = isset($map[$type]) ? $map[$type] : $type;
        }

        return $this->operator('$type', $type);
    }
240047
protected function cleanType(?string $type): ?string
    {
        if (!$type || in_array(strtolower($type), ['null', 'mixed']) || strpos($type, '|')) {
            return null;
        }
        $lowerType = strtolower($type);
        if (in_array(ltrim($lowerType, '?'), [
            'array', 'int', 'integer', 'bool', 'boolean', 'float', 'double', 
            'real', 'string', 'object', 'unset', 'callback'
        ])) {
            return $lowerType;
        }
        return '\\' . ltrim($type, '\\');
    }
322282
private function _getQueryChecksum()
    {
        return md5(
            serialize(
                [
                    "name" => $this->getName(),
                    "entity" => Convention::classToName(
                        $this->reflection->getClassName(), Convention::ENTITY_MASK
                    ),
                    "limit" => $this->limit,
                    "offset" => $this->offset,
                    "selection" => $this->selection,
                    "orderBy" => $this->orderBy,
                    "adapterAssociations" => array_keys($this->adapterAssociations),
                    "remoteAssociations" => array_keys($this->remoteAssociations),
                    "conditions" => $this->filter
                ]
            )
        );
    }
881129
protected function getTokenPattern(int $type): string
    {
        $patternMap = [
            Token::TYPE_SLASH => '/',
            Token::TYPE_ESCAPED => '~(0|1)',
            Token::TYPE_UNESCAPED => '[^/~]',
            Token::TYPE_ERROR_INVALID_ESCAPE => '~',
        ];
        if (!isset($patternMap[$type])) {
            throw new DomainException("Unknown token type: {$type}");
        }
        $pattern = $patternMap[$type];
        return "#{$pattern}#uA";
    }
159872
public function getIconType(?string $extension): string
    {
        if ($extension !== null && $extension !== '') {
            foreach (self::TYPE_TO_REGEX as $type => $regex) {
                if ($regex === null) {
                    continue;
                }
                if (($regex === $extension && preg_match('/[a-z0-9]+/', $extension))
                    || preg_match("/$regex/", $extension)
                ) {
                    return $type;
                }
            }
        }

        return self::ICON_DEFAULT;
    }
1161440
public function getCheck($check_id) {
    $this->ensureParameters(array('check_id' => $check_id), __METHOD__);
    $data = $this->request('GET', "checks/${check_id}");
    return $data->check;
  }
453849
protected function extractType($dbType)
	{
		if(strpos($dbType,'[')!==false || strpos($dbType,'char')!==false || strpos($dbType,'text')!==false)
			$this->type='string';
		elseif(strpos($dbType,'bool')!==false)
			$this->type='boolean';
		elseif(preg_match('/(real|float|double)/',$dbType))
			$this->type='double';
		elseif(preg_match('/(integer|oid|serial|smallint)/',$dbType))
			$this->type='integer';
		else
			$this->type='string';
	}