Get Composer autoloader instance.

@return \Composer\Autoload\ClassLoader
348498
protected function getComposer()
    {
        if ($autoloaders = spl_autoload_functions()) {
            foreach ($autoloaders as $autoload) {
                if (is_array($autoload)) {
                    $class = $autoload[0];
                    if ('Composer\Autoload\ClassLoader' == get_class($class)) {
                        return $class;
                    }
                }
            }
        }
    }
1225467
public static final CClassLoader getRootLoader() {
		if (CClassLoader.rootLoader == null) {
			CClassLoader.rootLoader = CClassLoader.createLoader(
					CClassLoader.class.getClassLoader(),
					CClassLoader.ROOT_LOADER);
		}
		return CClassLoader.rootLoader;
	}
738693
public function getLoader()
    {
        if (!($this->loader instanceof DictLoaderInterface)) {
            $dataDir = dirname(__DIR__).'/data/';

            $loaderName = $this->loader;
            $this->loader = new $loaderName($dataDir);
        }

        return $this->loader;
    }
517232
public static function get(Composer $composer): ?ProjectTypeInterface
    {
        $rootDir = dirname($composer->getConfig()->getConfigSource()->getName());

        $classes = static::getClasses($composer);

        $composerProjectType = $composer->getPackage()->getExtra()['rikudou']['installer']['project-type'] ?? null;
        if ($composerProjectType && isset($classes[$composerProjectType])) {
            $class = $classes[$composerProjectType];

            return new $class;
        }

        foreach ($classes as $class) {
            /** @var ProjectTypeInterface $instance */
            $instance = new $class;
            foreach ($instance->getDirs() as $dir) {
                if (is_array($dir)) {
                    $exists = true;
                    foreach ($dir as $requiredDir) {
                        $exists = $exists && file_exists("{$rootDir}/{$requiredDir}");
                    }
                    if ($exists) {
                        return $instance;
                    }
                } else {
                    if (file_exists("{$rootDir}/{$dir}")) {
                        return $instance;
                    }
                }
            }
        }

        return null;
    }
475728
private static function _getRepositoryManager()
	{
		self::_init();
		if (!self::$repositoryManager)
		{
			self::$repositoryManager = self::$composer->getRepositoryManager();
		}
		return self::$repositoryManager;
	}
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;
    }
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, "/");
    }
41656
@Override
    public ClassLoader getClassLoader() {
        ClassLoader classLoader = this.initialClass.getClassLoader();
        if (classLoader == null) {
            classLoader = application.getClassLoader();
        }
        return classLoader;
    }
504076
public function getCompiler()
	{	
		if (null === $this->_compiler) {	
			$this->_compiler = Dwoo_Compiler::compilerFactory();
		}

		return $this->_compiler;
	}
227496
public function getContainer()
    {
        if (!$this->container) {
            $package = $this->getPackage();

            $this->container = $package->getContainer() ?: Ioc::factory();
        }

        return $this->container;
    }
521352
public function initialize()
    {
        $vendorPath = $this->findVendorPath();

        $autoloader = $this->createAutoloader($vendorPath);

        return new Application($autoloader, array('composer.vendor_path' => $vendorPath));
    }
994399
public function create(Composer $composer): FileIteratorInterface
    {
        $config              = $composer->getConfig();
        $autoloadGenerator   = $composer->getAutoloadGenerator();
        $installationManager = $composer->getInstallationManager();
        $package             = $composer->getPackage();

        $autoloadGenerator->setClassMapAuthoritative(
            $config->get('classmap-authoritative')
        );
        $autoloadGenerator->setDevMode(false);

        $packageMap = $autoloadGenerator->buildPackageMap(
            $installationManager,
            $package,
            [$package]
        );

        $directives = $autoloadGenerator->parseAutoloads($packageMap, $package);

        $files = new AppendIterator();

        $files->append(
            $this->createClassmapIterator(
                $directives['classmap'] ?? [],
                $directives['exclude-from-classmap'] ?? []
            )
        );
        $files->append(
            $this->createFilesIterator(
                ...array_values($directives['files'] ?? [])
            )
        );
        $files->append(
            $this->createNamespaceIterator($directives['psr-0'] ?? [])
        );
        $files->append(
            $this->createNamespaceIterator($directives['psr-4'] ?? [])
        );

        return new FileIterator($files);
    }
421563
public function getLoader()
    {
        if (null === $this->loader) {
            $locator  = new FileLocator($this->paths);
            $resolver = new LoaderResolver(array(
                new YamlFileLoader($locator),
                new PhpFileLoader($locator),
                new IniFileLoader($locator),
                new ArrayLoader(),
            ));

            $this->loader = new DelegatingLoader($resolver);
        }

        return $this->loader;
    }
592841
private function getLoader(): LoaderInterface
    {
        if (null !== $this->loader) {
            return $this->loader;
        }

        if (null !== $this->localFile) {
            $this->loader = new Local($this->localFile);

            return $this->loader;
        }

        if (extension_loaded('curl')) {
            $this->loader = new Curl($this);

            return $this->loader;
        }

        $streamHelper = new StreamCreator($this);

        if (ini_get('allow_url_fopen')) {
            $this->loader = new FopenLoader($this, $streamHelper);

            return $this->loader;
        }

        $this->loader = new SocketLoader($this, $streamHelper);

        return $this->loader;
    }
1067600
public ClassLoader getClassLoader() {
        return classloader != null ? classloader : (classloader = Loader.getClassLoader(ResolverUtil.class, null));
    }
785841
public function createLoader(array $autoloads)
    {
        $loader = new ClassLoader();

        if (isset($autoloads['psr-0'])) {
            foreach ($autoloads['psr-0'] as $namespace => $path) {
                $loader->add($namespace, $path);
            }
        }

        if (isset($autoloads['psr-4'])) {
            foreach ($autoloads['psr-4'] as $namespace => $path) {
                $loader->addPsr4($namespace, $path);
            }
        }

        return $loader;
    }
934649
public function get()
    {
        return $this->findAndLoadClasses()
            ->map(function ($class) {
                return new ReflectionClass($class);
            })
            ->reject(function ($class) {
                return $this->rejectionStrategy->shouldClassBeRejected($class);
            })
            ->reject(function ($class) {
                foreach (config('stats.ignored_namespaces', []) as $namespace) {
                    if (Str::startsWith($class->getNamespaceName(), $namespace)) {
                        return true;
                    }
                }

                return false;
            })
            ->groupBy(function ($class) {
                return (new Classifier)->classify($class);
            });
    }