Register the PEAR2 autoload class with spl_autoload_register

\return
This method does not return anything.
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;
    }
121473
def _register(self, cls):
        
        if not inspect.isclass(cls):
            raise ValueError('Only classes may be registered.')
        elif not issubclass(cls, self._registerable_class):
            raise ValueError('Only %s classes or subclasses may be registered.'
                             % self._registerable_class.__name__)

        if cls not in self._registry:
            cls._registered_with = self
            self._registry[cls] = cls()

        return self._registry[cls]
494116
private function initialize()
    {

        if (is_file($file = getcwd().'/vendor/autoload.php')) {
            include_once $file;
        }
        $functions = spl_autoload_functions();
        foreach ($functions as $loader) {
            if (is_array($loader)) {
                $ob = $loader[0];
                if (is_object($ob)) {
                    $this->addAutoloader($ob);
                }
            }
        }
    }
751801
public function init()
	{
		self::$app = $this;

		spl_autoload_register(array($this['loader'], 'load'));

		$this->registerProviders();
		$this->registerAliases();
	}
489399
public static function initialise()
		{
		// Create the class index for autoloading or including
		$paths = array(dirname(__FILE__));
		while (list($i, $path) = each($paths))
			{
			$subDirectorys = glob($path . "*", GLOB_MARK | GLOB_ONLYDIR | GLOB_NOSORT);
			if (is_array($subDirectorys))
				{
				foreach ($subDirectorys as $subDirectory)
					{
					$paths[] = $subDirectory;
					}
				}
			$files = glob($path . "*.php", 0);
			if (is_array($files))
				{
				foreach ($files as $file)
					{
					$class = substr(basename($file), 0, -4);
					self::$classIndex[$class] = $file;
					}
				}
			}
		krsort(self::$classIndex);
		// Only use autoloading if spl_autoload_register() is available and no __autoload() is defined (because 
		// __autoload() breaks if spl_autoload_register() is used. 
		if (function_exists("spl_autoload_register") && !is_callable("__autoload"))
			{
			spl_autoload_register(array(__CLASS__, "autoload"));
			}
		// Otherwise include all class files
		else
			{
			foreach (self::$classIndex as $class => $file)
				{
				if (!class_exists($class))
					{
					require_once($file);
					}
				}
			}
		}
1246676
public function autoLoad($class) {
        $lowerClass = strtolower($class);

        if (isset($this->classMap[$lowerClass])) {
            include($this->classMap[$lowerClass]);
        }
    }
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);
        }
    }
78894
public function registerAutoloader(){
        $aliasManager = $this;
        spl_autoload_register(function($class) use($aliasManager) {
            $class = strtolower($class);
            if( !$aliasManager->checkIfAliasExists($class) ){
                if( !$aliasManager->findAlias($class) ){
                    throw new Exception("Class was not found! ($class)");
                }
            }

            $aliasManager->loadAlias($class);
        });
    }
1284172
public static function autoload($class)
    {
        // Don't interfere with other autoloaders
        if (0 !== strpos($class, 'Swift_')) {
            return;
        }

        $path = __DIR__.'/'.str_replace('_', '/', $class).'.php';

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

        require $path;

        if (self::$inits && !self::$initialized) {
            self::$initialized = true;
            foreach (self::$inits as $init) {
                call_user_func($init);
            }
        }
    }
1077618
public static function register($path = null)
    {
        self::$_path = $path ? $path : dirname(__FILE__);

        return spl_autoload_register([__CLASS__, 'load'], true, true);
    }
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);
    }
1360380
public static function register(){
		if( self::$registered ){
			return;
		}

		self::$libDir = dirname(__FILE__);

		if(false === spl_autoload_register(array('Less_Autoloader', 'loadClass'))){
			throw new Exception('Unable to register Less_Autoloader::loadClass as an autoloading method.');
		}

		self::$registered = true;
	}
1188087
public function registerAutoloader()
    {
        $this->app->afterResolving(DocumentManagerRegistry::class, function (ManagerRegistryInterface $registry) {
            /** @var DocumentManager $manager */
            foreach ($registry->getManagers() as $manager) {
                Autoloader::register(
                    $manager->getConfiguration()->getProxyDir(),
                    $manager->getConfiguration()->getProxyNamespace()
                );

            }
        });
    }
631880
public function register($class, $method, $delay = 60)
    {
        // check if declared callback is exist over autoload
        if (!class_exists($class) || !method_exists($class, $method)) {
            return false;
        }

        $callback = (string)$class . '::' . (string)$method;

        // add instance to cron task manager
        if (!isset($this->configs['instances'][$callback])) {
            $this->configs['instances'][$callback] = $delay;
            App::$Properties->writeConfig('Cron', $this->configs);
        }

        return true;
    }
905960
private static function _autoload($class)
    {
        $realClass = $class;
        if (preg_match('/^JProxy_/i', $class)) {
            $class = preg_replace('/^JProxy_/i', '', $class);
        }
        foreach (self::$prefixes as $prefix => $lookup) {
            $chr = strlen($prefix) < strlen($class) ? $class[strlen($prefix)] : 0;

            if (strpos($class, $prefix) === 0 && ($chr === strtoupper($chr))) {
                $existsBefore = class_exists($realClass, false);
                if ($realClass === $class) {
                    self::loadByAlias($realClass);
                    self::load($realClass);
                }
                $return = true;
                if (!$existsBefore && !class_exists($class, false)) {
                    $return = self::_load(substr($class, strlen($prefix)), $lookup);
                }
                if ($realClass === $class && !$existsBefore && class_exists($realClass, false)) {
                    self::injectStaticDependencies($class);
                }

                return $return;
            }
        }

        return false;
    }
1086427
protected function registerClassAliases(): void
	{
		$aliases = $this->config->get('application.class_aliases');

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

			spl_autoload_register([$aliasLoader, 'load']);
		}
	}
295919
public function register($prepend = false)
    {
        $this->composerClassLoader->unregister();
        spl_autoload_register(array($this, 'loadClassWithAlias'), true, $prepend);
    }