Register PropelAutoloader in spl autoloader.

@return void

@throws Exception
767799
public static function register()
    {
        ini_set('unserialize_callback_func', 'spl_autoload_call');

        if (false === spl_autoload_register(array(self::getInstance(), 'autoload'))) {
            throw new Exception(sprintf('Unable to register %s::autoload as an autoloading method.', get_class(self::getInstance())));
        }
    }
1174612
public static function register(){
        ini_set('unserialize_callback_func', 'spl_autoload_call');
        spl_autoload_register(function($class){
            $cfile = strtr($class,'_\\','//') . '.php';
            foreach (static::$paths as $path => $v) {
                $file = rtrim($path,'/').'/'.$cfile;
                if(is_file($file)) return include($file);
            }
            return false;
        },false,true);
    }
70211
public function register()
    {
        $moduleHandler = $this->diFactory->get('moduleHandler');
        $autoloadConf  = $moduleHandler->getModulesAutoloadConfig();

        if (isset($autoloadConf['namespaces'])) {
            if (!ArrayUtils::isHashTable($autoloadConf['namespaces'])) {
                throw new Exception\RuntimeException('Config autoload for namespace is invalid');
            }
            $this->loader->registerNamespaces($autoloadConf['namespaces']);
        }

        if (isset($autoloadConf['classmap'])) {
            $this->registerClassMap($autoloadConf['classmap']);
        }
        $this->loader->register();
        return $this;
    }
234024
public function register($throw = true, $prepend = true)
    {

        // now we have a config no matter what, we can store any instance we might need
        $this->getConfig()->storeInstances();

        // query whether the cache is ready or if we aren't in production mode
        if (!$this->cacheIsReady || $this->environment !== 'production') {
            // If yes, load the appropriate autoloader method
            spl_autoload_register(array($this, self::OUR_LOADER), $throw, $prepend);
            return;
        }

        // the cache is ready, so register the simple class loader
        spl_autoload_register(array($this, self::OUR_LOADER_PROD_NO_OMIT), $throw, $prepend);
    }
1128599
protected final void load()throws Exception
	{
		synchronized (this) {
			Set<Class<?>> classes=classProvider.getLoadedClasses();
			initScriptClasses(classes);
			onScriptLoaded(classes);
		}
	}
1148148
public function register()
    {
        $loader = \Illuminate\Foundation\AliasLoader::getInstance();
        // Register the alias.
        $loader->alias('Identicon', \Identicon\Identicon::class);
    }
1086427
protected function registerClassAliases(): void
	{
		$aliases = $this->config->get('application.class_aliases');

		if(!empty($aliases))
		{
			$aliasLoader = new AliasLoader($aliases);

			spl_autoload_register([$aliasLoader, 'load']);
		}
	}
1199158
public function registerProxyAutoloader()
    {
        $this->app->afterResolving(ManagerRegistry::class, function (ManagerRegistry $registry) {
            /** @var EntityManagerInterface $manager */
            foreach ($registry->getManagers() as $manager) {
                Autoloader::register(
                    $manager->getConfiguration()->getProxyDir(),
                    $manager->getConfiguration()->getProxyNamespace()
                );
            }
        });
    }
447330
public function register()
    {
        if ($this->app->environment('production')) {
            throw new Exception('It is unsafe to run Dusk in production.');
        }

        if ($this->app->runningInConsole()) {
            $this->commands([
                Console\InstallCommand::class,
                Console\DuskCommand::class,
                Console\DuskFailsCommand::class,
                Console\MakeCommand::class,
                Console\PageCommand::class,
                Console\ComponentCommand::class,
                Console\ChromeDriverCommand::class,
            ]);
        }
    }
1125845
protected function registerFileLoader()
    {
        $app = $this->app;
        $defaultLocale = config( 'app.locale' );
        $languageRepository = $app->make( LanguageRepository::class );
        $translationRepository = $app->make( TranslationRepository::class );
        $translationsPath = base_path( 'resources/lang' );
        $command = new TranslationsLoaderCommand( $languageRepository, $translationRepository, $app['files'], $translationsPath, $defaultLocale );

        $this->app['command.translator:load'] = $command;
        $this->commands( 'command.translator:load' );
    }
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);
        }
    }
26546
public function loadConfiguration(): void
	{
		if ($this->compiler->getExtensions(OrmExtension::class) === []) {
			throw new InvalidStateException(
				sprintf('You should register %s before %s.', self::class, static::class)
			);
		}

		$builder = $this->getContainerBuilder();
		$config = $this->validateConfig($this->defaults);

		$builder->addDefinition($this->prefix('xmlDriver'))
			->setFactory(XmlDriver::class, [
				Helpers::expand($config['paths'], $builder->parameters),
				$config['fileExtension'],
			]);

		$builder->getDefinitionByType(Configuration::class)
			->addSetup('setMetadataDriverImpl', [$this->prefix('@xmlDriver')]);
	}
1371317
public static function registerAutoload()
    {
        $autoload = array('HTMLPurifier_Bootstrap', 'autoload');
        if (($funcs = spl_autoload_functions()) === false) {
            spl_autoload_register($autoload);
        } elseif (function_exists('spl_autoload_unregister')) {
            if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
                // prepend flag exists, no need for shenanigans
                spl_autoload_register($autoload, true, true);
            } else {
                $buggy  = version_compare(PHP_VERSION, '5.2.11', '<');
                $compat = version_compare(PHP_VERSION, '5.1.2', '<=') &&
                          version_compare(PHP_VERSION, '5.1.0', '>=');
                foreach ($funcs as $func) {
                    if ($buggy && is_array($func)) {
                        // :TRICKY: There are some compatibility issues and some
                        // places where we need to error out
                        $reflector = new ReflectionMethod($func[0], $func[1]);
                        if (!$reflector->isStatic()) {
                            throw new Exception(
                                'HTML Purifier autoloader registrar is not compatible
                                with non-static object methods due to PHP Bug #44144;
                                Please do not use HTMLPurifier.autoload.php (or any
                                file that includes this file); instead, place the code:
                                spl_autoload_register(array(\'HTMLPurifier_Bootstrap\', \'autoload\'))
                                after your own autoloaders.'
                            );
                        }
                        // Suprisingly, spl_autoload_register supports the
                        // Class::staticMethod callback format, although call_user_func doesn't
                        if ($compat) {
                            $func = implode('::', $func);
                        }
                    }
                    spl_autoload_unregister($func);
                }
                spl_autoload_register($autoload);
                foreach ($funcs as $func) {
                    spl_autoload_register($func);
                }
            }
        }
    }
1045349
public function register()
    {
        if (!$this->isRegistered()) {
            $moduleObject =& $this->getObject();

            /**
             * It's important to check if module class defines InstallDB method (it must register module)
             * Thus absent InstallDB indicates that the module does not support automatic installation
             */
            if ((new \ReflectionClass($moduleObject))->getMethod('InstallDB')->class !== get_class($moduleObject)) {
                throw new Exception\ModuleInstallException(
                    'Missing InstallDB method. This module does not support automatic installation',
                    $this->name
                );
            }

            if (!$moduleObject->InstallDB() && BitrixException::hasException()) {
                throw new Exception\ModuleInstallException(
                    get_class($moduleObject) . '::InstallDB() returned false',
                    $this->name
                );
            }

            $moduleObject->InstallEvents();

            /** @noinspection PhpVoidFunctionResultUsedInspection */
            if (!$moduleObject->InstallFiles() && BitrixException::hasException()) {
                throw new Exception\ModuleInstallException(
                    get_class($moduleObject) . '::InstallFiles() returned false',
                    $this->name
                );
            }

            if (!$this->isRegistered()) {
                throw new Exception\ModuleInstallException(
                    'Module was not registered. Probably it does not support automatic installation.',
                    $this->name
                );
            }
        }

        return $this;
    }
501755
public function registerClassLoader() : void
    {
        if ($this->root === null) {
            return;
        }

        $path = sprintf('%s/%s/autoload.php', $this->root, $this->getVendorDirectory());

        if (!is_file($path)) {
            return;
        }

        require $path;
    }
235621
protected function registerLoader()
    {
        // to Translator
        $this->app->singleton('translation.loader', function ($app) {
            return new FileLoader($app['files'], $app['path.lang']);
        });

        // to Jargon
        $this->app->singleton('jargon.loader', function ($app) {
            return new FileLoader($app['files'], $app['path.jargon']);
        });
    }
490412
protected static function register()
    {
        if (!self::$registered) {
            // set up __autoload
            $autoload = spl_autoload_functions();
            spl_autoload_register(__CLASS__.'::load');
            if (function_exists('__autoload') && ($autoload === false)) {
                // __autoload() was being used, but now would be ignored, add
                // it to the autoload stack
                spl_autoload_register('__autoload');
            }
        }
        self::$registered = true;
    }