Enables static proxying by registering the autoloader.

Ensures that the autoloader is always at the end of the stack.

@return void
970580
public function enable()
    {
        if ($this->isLoaderRegistered($last)) {
            if ($last) {
                return;
            }

            $this->disable();
        }

        spl_autoload_register($this->aliasLoader);
    }
1125391
public function register() {
        if (!$this->registered) {
            spl_autoload_register([$this, 'autoLoad'], $throw=true, $prepend=false);
            $this->registered = true;
        }
        return $this;
    }
921395
public function enableOldBrowserSupport(): self
    {
        $this->needsCompile = ($this->needsCompile || $this->supportOldBrowsers !== true);
        $this->supportOldBrowsers = true;
        return $this;
    }
1218286
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);
        }
    }
1260576
public function setAutoGenerateProxyClasses(int $mode) : void
    {
        $this->autoGenerateProxyClasses = $mode;
        $proxyManagerConfig             = $this->getProxyManagerConfiguration();

        switch ($mode) {
            case self::AUTOGENERATE_FILE_NOT_EXISTS:
                $proxyManagerConfig->setGeneratorStrategy(new FileWriterGeneratorStrategy(
                    new FileLocator($proxyManagerConfig->getProxiesTargetDir())
                ));

                break;
            case self::AUTOGENERATE_EVAL:
                $proxyManagerConfig->setGeneratorStrategy(new EvaluatingGeneratorStrategy());

                break;
            default:
                throw new InvalidArgumentException('Invalid proxy generation strategy given - only AUTOGENERATE_FILE_NOT_EXISTS and AUTOGENERATE_EVAL are supported.');
        }
    }
1180233
public function register(): void
    {
        if (!$this->registered) {
            \spl_autoload_register([$this, 'load'], true, true);
            $this->registered = true;
        }
    }
1198915
public function auto_load() {
		/**
		 * do UI loader locations
		 *
		 * @param ui $this Current instance of this class
		 */
		do_action( 'uix_register', $this );
		// init the share object
		uix_share();

		// go over each locations
		foreach ( $this->locations as $type => $paths ) {

			if ( $this->is_callable( $type ) ) {
				$this->process_paths( $type, $paths );
			}
		}
	}
695937
public function enable()
    {
        spl_autoload_register([$this, 'autoload'], true, true);
        spl_autoload_register([$this, 'autoloadOptional'], true, false);
        return $this;
    }
279018
static private function _registerDispatch() {
        // Register dispatch function
        $auto_dispatch = !is_null(Config::get('router.auto_dispatch')) ?
            Config::get('router.auto_dispatch') :
            true;
        
        if (!self::$_dispatch_registered && $auto_dispatch) {
            // Make sure things ends here...
            register_shutdown_function(function() {
                // Get response data from Dispatcher
                $response = self::dispatch();
            });
            
            // Mark as dispatched
            self::$_dispatch_registered = true;
        }
    }
1298634
protected function bootstrapContainer()
    {
        static::setInstance($this);
        
        $this->instance('app', $this);
        
        $this->bootstrapEnvironment();
        
        $this->bindPathsInContainer();
        $this->registerContainerAliases();
        $this->registerCoreServices();
        $this->registerLogBindings();
        $this->registerTheme();
    }
235865
final public static function autoloadRegister()
    {
        // spl_autoload_register disables oldschool autoload
        // even if it was added using spl_autoload_register!
        // this is intended to preserve old autoloader

        $uses_autoload = function_exists('__autoload')
            && (!($tmp = spl_autoload_functions()) || ($tmp[0] === '__autoload'));

        // Prepending PHPTAL's autoloader helps if there are other autoloaders
        // that throw/die when file is not found. Only >5.3 though.
        if (version_compare(PHP_VERSION, '5.3', '>=')) {
            spl_autoload_register(array(__CLASS__,'autoload'), false, true);
        } else {
            spl_autoload_register(array(__CLASS__,'autoload'));
        }

        if ($uses_autoload) {
            spl_autoload_register('__autoload');
        }
    }
191253
public function loadConfiguration(): void
	{
		$config = $this->validateConfig($this->defaults, $this->config);

		foreach ($config as $bridge => $enabled) {
			// Don't register sub extension
			if ($enabled === false) {
				continue;
			}

			// Security check
			Validators::assertField($config, $bridge, 'array');

			// Register sub extension a.k.a CompilerPass
			$this->passes[$bridge] = new $this->map[$bridge]();
			$this->passes[$bridge]->setCompiler($this->compiler, $this->prefix($bridge));
			$this->passes[$bridge]->setConfig($this->config[$bridge] ?? []);
			$this->passes[$bridge]->loadConfiguration();
		}
	}
700859
protected function initializeProxy(): void
    {
        //Initialize internal vars
        $this->states = [];
        $this->activesStates = [];
        $this->callerStatedClassesStack = new \SplStack();
        //Creates
        $this->loadStates();
    }
572746
public function registerDispatcher()
    {
        $this->app->singleton('api.dispatcher', function ($app) {
            $dispatcher = new Dispatcher($app, $app['files'], $app[\Dingo\Api\Routing\Router::class], $app[\Dingo\Api\Auth\Auth::class]);

            $dispatcher->setSubtype($this->config('subtype'));
            $dispatcher->setStandardsTree($this->config('standardsTree'));
            $dispatcher->setPrefix($this->config('prefix'));
            $dispatcher->setDefaultVersion($this->config('version'));
            $dispatcher->setDefaultDomain($this->config('domain'));
            $dispatcher->setDefaultFormat($this->config('defaultFormat'));

            return $dispatcher;
        });
    }
978120
public function registerDispatcher()
    {
        $this->app->singleton('api.dispatcher', function ($app) {
            $dispatcher = new Dispatcher(
                $app, $app['files'], $app['Dingo\Api\Routing\Router'], $app[Auth::class]
            );

            $dispatcher->setSubtype($this->config('subtype'));
            $dispatcher->setStandardsTree($this->config('standardsTree'));
            $dispatcher->setPrefix($this->config('prefix'));
            $dispatcher->setDefaultVersion($this->config('version'));
            $dispatcher->setDefaultDomain($this->config('domain'));
            $dispatcher->setDefaultFormat($this->config('defaultFormat'));

            return $dispatcher;
        });
    }
1183151
protected function init()
    {
        $this->registers = [
            static::PHP_SHELL => PhpShellRegisterProvider::class,
        ];
        $this->validators = [
            static::PHP_SHELL => PhpShellValidatorProvider::class,
        ];
        $this->conditions = [
            static::PHP_SHELL => PhpShellConditionProvider::class
        ];
        $this->functions = [
            static::PHP_SHELL => PhpShellFunctionProvider::class
        ];
    }
1326235
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$serverName = (string)$baseClass->getServerName();
            static::$refererIntegrityEnabled = (bool)$baseClass->Session->RefererIntegrity->enabled;
            static::$tokenIntegrityEnabled = (bool)$baseClass->Session->TokenIntegrity->enabled;
            static::$tokenUseLooseIP = (bool)$baseClass->Session->TokenIntegrity->useLooseIP;
            static::$tokenUseHttpUserAgent = (bool)$baseClass->Session->TokenIntegrity->useHttpUserAgent;
            static::$tokenUseHttpAccept = (bool)$baseClass->Session->TokenIntegrity->useHttpAccept;
            static::$tokenUseHttpAcceptCharset = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptCharset;
            static::$tokenUseHttpAcceptEncoding = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptEncoding;
            static::$tokenUseHttpAcceptLanguage = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptLanguage;
        }
    }