Slim PSR-0 autoloader
977404
final public static function autoload($className)
    {
        if (\Phar::running() && defined('PHAR_SWAGGER_VALIDATOR_ROOT_PATH')) {
            $baseDir = PHAR_SWAGGER_VALIDATOR_ROOT_PATH;
        }
        elseif (\Phar::running()) {
            $baseDir = null;
        }
        else {
            $baseDir = __DIR__ . DIRECTORY_SEPARATOR;
        }

        $thisClass = 'SwaggerValidator';

        $namespace = explode('\\', $className);
        $className = array_pop($namespace);
        $rootPath  = array_shift($namespace);

        if ($rootPath == $thisClass) {
            $namespace = $baseDir . trim(implode(DIRECTORY_SEPARATOR, $namespace), DIRECTORY_SEPARATOR);
        }
        else {
            $namespace = $baseDir . trim($rootPath . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $namespace), DIRECTORY_SEPARATOR);
        }

        if (substr($namespace, -1, 1) != DIRECTORY_SEPARATOR) {
            $namespace .= DIRECTORY_SEPARATOR;
        }

        if ($namespace == DIRECTORY_SEPARATOR) {
            $namespace = "";
        }

        $fileName = $namespace . str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';

        if (file_exists($fileName)) {
            require_once $fileName;
        }
    }
860826
protected function register_autoload() {
        $src_dir = $this->get_src_path();

        if ( file_exists( $src_dir ) ) {
            register_wp_autoload( $this->options->namespace, $src_dir );
        }
    }
722135
public function bootstrap()
    {

        // setup autoloader
        require SERVER_AUTOLOADER;

        // make the application available and register the class loaders
        $application = $this->getApplication();
        $application->registerClassLoaders();

        // register the applications annotation registries
        $application->registerAnnotationRegistries();

        // try to load the profile logger
        if (isset($this->loggers[LoggerUtils::PROFILE])) {
            $this->profileLogger = $this->loggers[LoggerUtils::PROFILE];
            $this->profileLogger->appendThreadContext('timer-factory');
        }
    }
274958
private function autoload_plugins($scheduler)
  {
    if (env('DEV_AUTOLOAD_PLUGINS') == true) {
      $plugins = config('app.plugins');

      foreach($plugins as $plugin => $class) {
        $class::schedule($scheduler);
      }
    }
  }
751752
protected function __autoload($className)
	{
		// Single modules autoload

		foreach ($this->config('defaultAutoloads') as $key => $dir)
		{
			$fileName = $dir . DIRECTORY_SEPARATOR . $className . '.php';
			$fileName = str_replace('\\', DIRECTORY_SEPARATOR, $fileName);

			if (file_exists($fileName) && !class_exists($className))
			{
				$this->loadFiles[$className] = $fileName;

				require $fileName;
			}
		}

		// Multi-Modules autoload

		$modules = array_merge([], $this->config('modules'));

		foreach ($modules as $key => $module)
		{
			$module = ($module == '') ? $module : $module . DIRECTORY_SEPARATOR;

			foreach ($this->config('mvcDirs') as $k => $mvc)
			{
                $phpFile  = explode("\\", $className);
                $phpFile  = $phpFile[count($phpFile) - 1];
				$fileName = $this->path . str_replace('\\', DIRECTORY_SEPARATOR, strtolower(str_replace($phpFile, '', $className))). $phpFile . '.php';

				if (file_exists($fileName) && !class_exists($className))
				{
					$this->loadFiles[$className] = $fileName;

					require $fileName;
				}
			}
		}

		// User custom autoloads

		foreach ($this->config('autoloads') as $key => $dir)
		{
			$fileName = realpath($dir) . DIRECTORY_SEPARATOR . $className . '.php';
			$fileName = str_replace('\\', DIRECTORY_SEPARATOR, $fileName);

			if (file_exists($fileName) && !class_exists($className))
			{
				$this->loadFiles[$className] = $fileName;

				require $fileName;
			}
		}
	}
184062
public static function setupRobotLoader(?callable $callback = null): void
	{
		$loader = new RobotLoader();
		$loader->setTempDirectory(CACHE_DIR);

		if ($callback !== null) {
			$callback($loader);
		} else {
			$loader->addDirectory(ENGINE_DIR);
			$loader->addDirectory(APP_DIR);
			$loader->setAutoRefresh(true);
		}

		$loader->register();
	}
1074922
def getLoader(user, repo, sha=None, prov=None):
    """"""
    if user is None and repo is None:
        loader = LocalLoader()
    else:
        loader = GithubLoader(user, repo, sha, prov)
    return loader
936801
protected function getAutoloaderFile()
    {
        $app_path = $this->getPlainPath();
        $root_path = dirname($this->getPlainPath());
        $autoloader_file = str_replace($root_path, '', $app_path) . DIRECTORY_SEPARATOR . 'autoloader.php';
        return trim($autoloader_file, "/");
    }
29516
public static function registerAutoloader()
	{
		if (null !== static::$loader) {
			return static::$loader;
		}

		static::$loader = $loader = new \Composer\Autoload\ClassLoader();
		$vendorDir = dirname(__DIR__);
		$baseDir = dirname($vendorDir);

		$map = require 'phar://'.__DIR__.'/../../../composer.phar/vendor/composer/autoload_namespaces.php';
		foreach ($map as $namespace => $path) {
			$loader->set($namespace, $path);
		}

		$map = require 'phar://'.__DIR__.'/../../../composer.phar/vendor/composer/autoload_psr4.php';
		foreach ($map as $namespace => $path) {
			$loader->setPsr4($namespace, $path);
		}

		$classMap = require 'phar://'.__DIR__.'/../../../composer.phar/vendor/composer/autoload_classmap.php';
		if ($classMap) {
			$loader->addClassMap($classMap);
		}

		$loader->register();

		return $loader;
	}
844325
protected function _registerAutoloader()
	{
		if( self::$_autoloader === false )
		{
			spl_autoload_register( array( $this, 'autoload' ), true, false );
			self::$_autoloader = true;
		}
	}
1365272
public static function autoload()
    {
        // Vendor path
        $dir_base = realpath(__DIR__ . '/../../../../');

        $finder = new Finder();
        $finder->files()
            ->ignoreVCS(true)
            ->ignoreDotFiles(false)
            ->name('service.yml')
            ->exclude('Tests')
            ->exclude('tests')
            ->in($dir_base);

        foreach ($finder as $file) {
            self::autoloadFile($file);
        }
    }
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;
    }
1180029
public function setComposerAutoload(string $packageName, array $autoload): self
    {
        $this->reset();

        if (isset($autoload['psr-0'])) {
            $this->addPsr0($packageName, (array) $autoload['psr-0']);
        }

        if (isset($autoload['psr-4'])) {
            $this->addPsr4($packageName, (array) $autoload['psr-4']);
        }

        if (isset($autoload['classmap'])) {
            $this->addClassmap($packageName, (array) $autoload['classmap']);
        }

        if (isset($autoload['exclude-from-classmap'])) {
            $this->setExcludes((array) $autoload['exclude-from-classmap']);
        }

        return $this;
    }
1100409
function SerialDeviceLoader(Device, useGlobal) {

  // call super class
  DeviceLoader.call(this);

  this.Device = Device;

  this.useGlobal = (useGlobal === undefined || useGlobal === null) ? true : useGlobal;

  if (this.useGlobal) {
    this.globalSerialDeviceLoader = globalSerialDeviceLoader.create(Device, this.filter);
  }
}
247215
private function loadDirectoryFromAutoloader()
    {
        $spl = spl_autoload_functions();

        $dirs = array();
        foreach ($spl as $item) {
            $object = $item[0];
            if (!$object instanceof ClassLoader) {
                continue;
            }
            $temp = array_merge($object->getPrefixes(), $object->getPrefixesPsr4());
            foreach ($temp as $name => $dir) {
                if (false === strpos($name, 'Dotfiles')) {
                    continue;
                }
                foreach ($dir as $num => $path) {
                    $path = realpath($path);
                    if ($path && is_dir($path) && !in_array($path, $dirs)) {
                        $dirs[] = $path;
                    }
                }
            }
        }

        return $dirs;
    }
506128
private function setAutoLoading()
    {
        // set auto-loading for restler
        $autoload = PATH_site . 'typo3conf/ext/restler/vendor/autoload.php';
        if (file_exists($autoload)) {
            require_once $autoload;
        }

        // set auto-loading for extBase/TYPO3-classes
        $objectManager = $this->objectManager;
        Scope::$resolver = function ($className) use ($objectManager) {
            return $objectManager->get($className);
        };
    }
92764
def autoloadable_module?(path_suffix)
      load_paths.each do |load_path|
        return load_path if File.directory? File.join(load_path, path_suffix)
      end
      nil
    end