getLoader

@return  \Twig_LoaderInterface
426357
public function getLoader()
    {
        if (!$this->loader) {
            $this->loader = new TwigFilesystemLoader(
                $this->packageFinder,
                $this->dumpPaths(),
                $this->config->get('path_separator')
            );
        }

        return $this->loader;
    }
590702
protected function loadTemplates()
	{
		$loader = new \Twig_Loader_Filesystem(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'templates');
		$this->twigEnv = new Twig_Environment($loader, ['cache' => false, 'debug' => true]);
		$this->twigEnv->addExtension(new Twig_Extension_Debug());

		// Custom filter for phpdoc
		$filter = new \Twig_Filter('phpdoc', function($string, $indentationCount = 0, $indentChar = "\t") {
			$result = str_repeat($indentChar, $indentationCount) . '/**' . "\n";
			// Split per line
			$lines = explode("\n", trim($string));
			foreach ($lines as $line) {
				$result .= str_repeat($indentChar, $indentationCount) . ' * ' . $line . "\n";
			}
			$result .= str_repeat($indentChar, $indentationCount) . ' */' . "\n";
			return $result;
		});

		$this->twigEnv->addFilter($filter);

		$this->managerTemplate = $this->twigEnv->load('manager.php.twig');
		$this->resourceTemplate = $this->twigEnv->load('resource.php.twig');
		$this->mainClientTemplate = $this->twigEnv->load('mainClient.php.twig');
		$this->mainExceptionTemplate = $this->twigEnv->load('mainException.php.twig');
		$this->unexpectedResponseExceptionTemplate = $this->twigEnv->load('unexpectedResponseException.php.twig');

		if (!is_null($this->testsOutputPath)) {
			$this->mainClientTestTemplate = $this->twigEnv->load('mainClientTest.php.twig');
			$this->managerTestTemplate = $this->twigEnv->load('managerTest.php.twig');
		}
	}
702961
public function getAutoloader()
    {
        if (!isset($this->autoloader)) {
            $this->autoloader = new Autoloader(new FileLocator($this->getPath()), $this->getInflector());
        }

        return $this->autoloader;
    }
1374544
protected function getLoaderConfig()
    {
        return [
            LoaderInterface::FROM_STRING     => false,
            LoaderInterface::SIMPLEXML       => false,
            LoaderInterface::DOM_CLASS       => __NAMESPACE__.'\\Dom\DOMDocument',
            LoaderInterface::SIMPLEXML_CLASS => __NAMESPACE__.'\\SimpleXMLElement'
        ];
    }
751346
public function getCompiler()
    {
        if (null === $this->compiler) {
            $this->compiler = new Twig_Compiler($this);
        }

        return $this->compiler;
    }
1248550
protected function getLoader()
    {
        $config = $this->getConfig();
        $chain = new \Twig_Loader_Chain();

        // use template's own directory to search for templates
        $paths = array($config['phr_template_dir']);

        // inject common paths
        $projectPath = new ProjectPath($config['phr_template_dir']);
        if ($projectPath = $projectPath->get()) {
            $paths[] = $projectPath . DIRECTORY_SEPARATOR . 'layouts';
            $paths[] = $projectPath;
        }
        $chain->addLoader(new \Twig_Loader_Filesystem($paths));

        // add string template loader, which is responsible for loading templates
        // and removing front-matter
        $chain->addLoader(new \Phrozn\Twig\Loader\String);

        return $chain;
    }
142186
public static function getDefaultLoaders(LoaderInterface $fileLoader = null): array
    {
        $loaders = [
            'dir' => new Loader\DirLoader(),
            'ini' => new Loader\IniLoader(),
            'json' => new Loader\JsonLoader(),
            'yaml' => function_exists('yaml_parse') ? new Loader\YamlLoader() : new Loader\YamlSymfonyLoader(),
            'env' => new Loader\EnvLoader(),
            'Aws\DynamoDb\DynamoDbClient' => new Loader\DynamoDBLoader()
        ];

        $loaders['yml'] = $loaders['yaml'];

        if (isset($fileLoader)) {
            $loaders['dir']->setFileLoader($fileLoader);
        }

        return $loaders;
    }
362532
public function getTwig()
    {
        if ($this->_twig === null) {
            $this->_twig = new \Twig_Environment(new \Twig_Loader_Array());
        }

        return $this->_twig;
    }
147708
public function getLoader($path = null)
    {
        if (!$this->loader) {
            $options = [
                // 'extension' => '.html'
            ];

            $options = array_merge($options, (array) $this->config->get('loader_options', []));

            $this->loader = new \Mustache_Loader_FilesystemLoader($path, $options);
        }

        return $this->loader;
    }
742771
public function getImporter()
    {
        return $this->loader->getImportLoader()->getImporter(
                $this->getRequest()->getControllerName(),
                $this->getModel()
                );
    }
22020
protected function getContainerLoader(ContainerInterface $container)
    {
        $locator = new FileLocator($this);
        $resolver = new LoaderResolver([
            new XmlFileLoader($container, $locator),
            new YamlFileLoader($container, $locator),
            new IniFileLoader($container, $locator),
            new PhpFileLoader($container, $locator),
            new DirectoryLoader($container, $locator),
            new ClosureLoader($container),
        ]);

        return new DelegatingLoader($resolver);
    }
425094
public function getLoader($format)
    {
        $loader = null;
        $i = 0;
        $ids = array_keys($this->loaderIds);

        while ($i < count($ids) && null === $loader) {
            if (in_array($format, $this->loaderIds[$ids[$i]])) {
                $loader = $this->container->get($ids[$i]);
            }
            $i++;
        }

        if (!($loader instanceof LoaderInterface)) {
            throw new \RuntimeException(sprintf('No loader found for "%s" format.', $format));
        }

        return $loader;
    }
477619
public function getLoader()
    {
        if ($this->loader === null) {
            return new SuiteLoader($this->configuration->getGrep());
        }
        return $this->loader;
    }
1025080
public function getrenderer() {
    if (empty($this->renderer)) {
      $this->renderer = \Drupal::service('renderer');
    }
    return $this->renderer;
  }
131166
protected function getTwig(\Twig_LoaderInterface $loader)
    {
        $twig = new \Twig_Environment($loader);
        $twig->setCache(false);

        return $twig;
    }
1290045
protected function getLoader(string $path): LoaderInterface
    {
        if (null === $this->loaderClass) {
            throw new RuntimeException('You must implement '.__METHOD__.' or pass the loader class to the constructor');
        }

        return new $this->loaderClass($path);
    }
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;
    }