Get Autoloader Object

@return LoaderAutoloadAggregate
774843
protected function _getDefaultAutoloader()
    {
        static $staticLoader;

        if (!$staticLoader instanceof iLoaderAutoload) {
            $staticLoader = new LoaderAutoloadAggregate;
            $staticLoader->attach(new LoaderAutoloadNamespace(), 10);
            $staticLoader->attach(new LoaderAutoloadClassMap() , 100);
            
            $staticLoader->register(true);
        }

        return $staticLoader;
    }
1331581
private function prepareAutoloaderFile()
    {
        $plain_name      = pathinfo($this->getPlainPath(), PATHINFO_BASENAME);
        $obfuscated_name = pathinfo($this->getObfuscatedPath(), PATHINFO_BASENAME);

        $autoloader = $this->getPlainPath() . DIRECTORY_SEPARATOR . 'autoloader.php';
        $contents = file_get_contents($autoloader);
        $contents = str_replace($obfuscated_name, $plain_name, $contents);
        return (file_put_contents($autoloader, $contents) !== false);
    }
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;
                    }
                }
            }
        }
    }
1176598
public function getTwig()
    {
        if (!$this->twig) {
            Twig_Autoloader::register();
            $this->twig_loader = new Twig_Loader_Filesystem($this->base_view_path);

            $this->twig = new Twig_Environment(
                $this->twig_loader,
                $this->loader_configs
            );
        }

        return $this->twig;
    }
1165174
public static function getAutoloadNamespaces() {
		// FIXME: adapt this to PSR-4!
		$composer = json_decode(file_get_contents(__DIR__."/../../../../../composer.json"), true);
		
		if (isset($composer["autoload"]["psr-0"])) {
			$autoload = $composer["autoload"]["psr-0"];
		}
                else {
                    return null;
                }
		
		if (self::isAssoc($autoload)) {
			return self::unfactorizeAutoload(array($autoload));
		} else {
			return self::unfactorizeAutoload($autoload);
		}		
	}
1331103
public function getLoader()
	{
		if ($this->loader === null) {
			$this->loader = new Dwoo_Loader($this->getCompileDir());
		}

		return $this->loader;
	}
1314616
public function overload(): self
    {
        $this->loader = new Loader($this->files);
        $this->loader->load();

        return $this;
    }
732399
private function getFixtureLoader()
    {
        $container = $this->kernel->getContainer();

        $loader = class_exists('Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader')
            ? new DataFixturesLoader($container)
            : (class_exists('Doctrine\Bundle\FixturesBundle\Common\DataFixtures\Loader')
                ? new DoctrineFixturesLoader($container)
                : new SymfonyFixturesLoader($container));

        return $loader;
    }
614250
public function collectionLoaderFactory()
    {
        if (!isset($this->collectionLoaderFactory)) {
            throw new RuntimeException(sprintf(
                'Collection Loader Factory is not defined for [%s]',
                get_class($this)
            ));
        }

        return $this->collectionLoaderFactory;
    }
245413
public function getAutomationRenderer()
    {
        $this->automationRenderer = $this->getLayout()->createBlock(
            \Dotdigitalgroup\Email\Block\Adminhtml\Config\Select::class,
            '',
            ['data' => ['is_render_to_js_template' => true]]
        );

        return $this->automationRenderer;
    }
255641
public static function getInstance(AssetsInstallerInterface $installer = null)
    {
        if (empty(self::$_instance)) {
            if (empty($installer)) {
                throw new \InvalidArgumentException(
                    sprintf('Can not instantiate autoloader generator singleton object "%s"' .
                        ' without an "AssetsInstallerInterface" object argument!',
                        get_called_class())
                );
            }
            $cls = get_called_class();
            self::$_instance = new $cls($installer);
        }
        return self::$_instance;
    }
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;
    }
164428
protected function load()
    {
        $data = array();

        /** @var LoaderInterface $loader */
        foreach ($this->loaders as $loader) {
            try {
                $data = array_merge($data, $loader->load());

                if ($loader->stopPropagation()) {
                    break;
                }
            } catch (LoaderException $e) {
                $this->getLogger()->error($e->getMessage());
            }
        }

        return $data;
    }
1286238
public function getInstance()
    {
        if (!$this->parserInstance) {
            /**
             * Check if Twig_Autoloader class exists
             * otherwise include it.
             */
        
            if (!class_exists('\Twig_Autoloader')) {
                require_once $this->parserDirectory . '/Autoloader.php';
            }

            \Twig_Autoloader::register();
            $loader = new \Twig_Loader_Filesystem($this->getTemplateDirs());
            $this->parserInstance = new \Twig_Environment(
                $loader,
                $this->parserOptions
            );

            foreach ($this->parserExtensions as $ext) {
                $extension = is_object($ext) ? $ext : new $ext;
                $this->parserInstance->addExtension($extension);
            }
        }

        return $this->parserInstance;
    }
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;
	}
738693
public function getLoader()
    {
        if (!($this->loader instanceof DictLoaderInterface)) {
            $dataDir = dirname(__DIR__).'/data/';

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

        return $this->loader;
    }
949816
private function getMetadataDriver()
    {
        if (null === $this->driver) {
            $metadataDirs = $this->getMetadataDirs();

            $annotationDriver = new AnnotationDriver($this->reader);
            if (!empty($metadataDirs)) {
                $fileLocator = new FileLocator($metadataDirs);
                $ymlDriver = new YamlDriver($fileLocator);
                $this->driver = new DriverChain(array(
                    $ymlDriver,
                    $annotationDriver,
                ));

                $ymlDriver->setDriver($this->driver);
            }
            else {
                $this->driver = $annotationDriver;
            }
        }

        return $this->driver;
    }