public static function enable()
    {
        if (!is_array($functions = spl_autoload_functions())) {
            return;
        }

        foreach ($functions as $function) {
            spl_autoload_unregister($function);
        }

        foreach ($functions as $function) {
            if (is_array($function) && $function[0] instanceof UniversalClassLoader) {
                $loader = new static();
                $loader->registerNamespaceFallbacks($function[0]->getNamespaceFallbacks());
                $loader->registerPrefixFallbacks($function[0]->getPrefixFallbacks());
                $loader->registerNamespaces($function[0]->getNamespaces());
                $loader->registerPrefixes($function[0]->getPrefixes());
                $loader->useIncludePath($function[0]->getUseIncludePath());

                $function[0] = $loader;
            }

            spl_autoload_register($function);
        }
    }
public static function enable()
    {
        if (!is_array($functions = spl_autoload_functions())) {
            return;
        }

        foreach ($functions as $function) {
            spl_autoload_unregister($function);
        }

        foreach ($functions as $function) {
            if (is_array($function) && $function[0] instanceof UniversalClassLoader) {
                $loader = new static();
                $loader->registerNamespaceFallbacks($function[0]->getNamespaceFallbacks());
                $loader->registerPrefixFallbacks($function[0]->getPrefixFallbacks());
                $loader->registerNamespaces($function[0]->getNamespaces());
                $loader->registerPrefixes($function[0]->getPrefixes());
                $loader->useIncludePath($function[0]->getUseIncludePath());

                $function[0] = $loader;
            }

            spl_autoload_register($function);
        }
    }
public static function enable ( ) { if ( ! is_array ( $ functions = spl_autoload_functions ( ) ) ) { return ; } foreach ( $ functions as $ function ) { spl_autoload_unregister ( $ function ) ; } foreach ( $ functions as $ function ) { if ( is_array ( $ function ) && $ function [ 0 ] instanceof UniversalClassLoader ) { $ loader = new static ( ) ; $ loader -> registerNamespaceFallbacks ( $ function [ 0 ] -> getNamespaceFallbacks ( ) ) ; $ loader -> registerPrefixFallbacks ( $ function [ 0 ] -> getPrefixFallbacks ( ) ) ; $ loader -> registerNamespaces ( $ function [ 0 ] -> getNamespaces ( ) ) ; $ loader -> registerPrefixes ( $ function [ 0 ] -> getPrefixes ( ) ) ; $ loader -> useIncludePath ( $ function [ 0 ] -> getUseIncludePath ( ) ) ; $ function [ 0 ] = $ loader ; } spl_autoload_register ( $ function ) ; } }
Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones.
Replaces all regular UniversalClassLoader instances by a DebugUniversalClassLoader ones .