public static function register(array $aliases)
    {
        if (!$aliases) {
            return;
        }

        if (!isset(self::$autoloadFn)) {
            $classAliases = &self::$aliases;
            self::$autoloadFn = function ($className) use (&$classAliases) {
                if (isset($classAliases[$className])) {
                    if (strtolower($classAliases[$className]) === strtolower($className)) {
                        throw new \LogicException("Class alias is referencing the alias itself");
                    }
                    $facadeClass = $classAliases[$className];
                    class_alias($facadeClass, $className);
                }
            };

            spl_autoload_register(self::$autoloadFn);
        }

        self::$aliases = array_merge(self::$aliases, $aliases);
    }