public static function loadClass(string $className)
    {
        if (self::$isInit === false) {
            throw new BadUse('bootstrap doesn\'t seem to have been initialized');
        }
        $fileName = null;
        if (($namespacePos = strripos($className, '\\')) !== false) {
            $namespacePos = (int) $namespacePos; // re: https://github.com/phpstan/phpstan/issues/647
            $namespace = substr($className, 0, $namespacePos);
            $subNamespaces = array();
            while ($fileName === null && $namespace != null) {
                if (isset(self::$namespaces[$namespace]) === false) {
                    $subNamespacePos = strripos($namespace, '\\');
                    $subNamespacePos = (int) $subNamespacePos; // re: https://github.com/phpstan/phpstan/issues/647
                    $subNamespaces[] = substr($namespace, $subNamespacePos);
                    $namespace = substr($namespace, 0, $subNamespacePos);
                } else {
                    $fileName = self::$namespaces[$namespace];
                }
            }
            if ($fileName === null) {
                throw new UnknownNamespace('can\'t find namespace "' . substr($className, 0, $namespacePos) . '"');
            }
            $fileName = self::$namespaces[$namespace] . str_replace('\\', DIRECTORY_SEPARATOR, implode('', array_reverse($subNamespaces)));
            $className = substr($className, $namespacePos + 1);
        }
        if ($fileName != null) {
            $fileName .= DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
            require $fileName;
        }
    }