Get factory loader. If it is not defined, it will be set.
@param object|null $loader
@return \Phactory\Loader
433191
public static function loader($loader = null)
    {
        if (is_object($loader)) {
            self::$loader = $loader;
        }

        return isset(self::$loader) ? self::$loader : self::$loader = new Loader;
    }
203759
public function getParents(LoaderInterface $loader = null)
    {
        if (empty($this->parents) && $this->id !== static::$root)
            $this->parents = [$this->getRoot()];

        $acl = $this->getACL();
        if (null === $acl)
            throw new \RuntimeException("ACL is null on " . get_class($this));
        $parents = [];
        $ids = array_keys($this->parents);
        foreach ($ids as $id)
        {
            if ($this->parents[$id] === null)
            {
                if (!$acl->hasInstance(static::class, $id) && $loader !== null)
                {
                    $parent = $loader->load($id, static::class);
                    $acl->setInstance($parent);
                    $this->parents[$id] = $parent;
                }
                else
                {
                    $this->parents[$id] = $acl->getInstance(static::class, $id);
                }
            }
            $parents[] = $this->parents[$id];
        }
        return $parents;
    }
1202871
public function factory(Injector $injector)
	{
		$this->injector  = $injector;
		$this->constructed = true;

		return $this;
	}
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;
    }
249599
public function getDefinitionLoader()
    {
        if (empty($this->definitionLoader) && array_key_exists('prefix', $this->options)) {
            $this->definitionLoader = $this->loaderFactory->create($this->options['prefix']);
        }

        return $this->definitionLoader;
    }
1202215
public static function setLoader($loader) {
    if (!$loader) {
      self::$_loader = NULL;
      return;
    }
    if ($loader instanceof FluentDOM\Loadable) {
      self::$_loader = $loader;
      return;
    }
    throw new FluentDOM\Exceptions\InvalidArgument(
      'loader', [Loadable::class]
    );
  }
249314
public function setAssetsLoader(AssetsLoader $loader)
    {
        $this->assets_loader = $loader;
        $assets_db = $this->assets_loader->getAssets();
        if (!empty($assets_db)) {
            $_assets_package = Package::createFromAssetsLoader($this->assets_loader);
            foreach ($assets_db as $package=>$config) {
                if (!empty($config['views_path'])) {
                    $assets_package = clone $_assets_package;
                    $assets_package->loadFromArray($config);
                    foreach ($assets_package->getViewsPaths() as $path) {
                        $full_path = $assets_package->getFullPath($path);
                        if (@file_exists($full_path)) {
                            $this->setToView('setIncludePath', $full_path);
                        }
                    }
                }
            }
        }
        return $this;
    }
566250
public static function registerLoader($loader, string ...$contentTypes): FluentDOM\Loaders {
    $loaders = self::getDefaultLoaders();
    if (count($contentTypes) > 0) {
      $lazyLoader = new \FluentDOM\Loader\Lazy();
      foreach ($contentTypes as $contentType) {
        $lazyLoader->add($contentType, $loader);
      }
      $loaders->add($lazyLoader);
    } elseif (is_callable($loader)) {
      self::registerLoader($loader());
    } else {
      $loaders->add($loader);
    }
    self::$_loader = NULL;
    return $loaders;
  }
1088470
public function setLoaderFallback($name, callable $loader)
    {
        $fallbackDomain = 'default';
        if (!$this->_useFallback || $name === $fallbackDomain) {
            return $loader;
        }
        $loader = function () use ($loader, $fallbackDomain) {
            /* @var \Aura\Intl\Package $package */
            $package = $loader();
            if (!$package->getFallback()) {
                $package->setFallback($fallbackDomain);
            }

            return $package;
        };

        return $loader;
    }
1126737
public function addLoader(Loader $loader)
    {
        $loader->setLocator($this->locator);

        $this->resolver->addLoader($loader);
    }
561518
public function getFileLoader(): LoaderInterface
    {
        if (!isset($this->fileLoader)) {
            $this->fileLoader = new DelegateLoader();
        }

        return $this->fileLoader;
    }
911555
public function load(string $class)
    {
        $alias = $this->loader;
        if (isset($alias[$class])) {
            class_alias($alias[$class], $class);
        }

        $class = $this->alias($class);
        if (!$this->container->has($class)) {
            return null;
        }

        $instance = $this->container[$class];
        if (is_object($instance)) {
            return $instance;
        }

        return null;
    }
1331103
public function getLoader()
	{
		if ($this->loader === null) {
			$this->loader = new Dwoo_Loader($this->getCompileDir());
		}

		return $this->loader;
	}
794217
public static function bootstrap(ClassLoader $loader)
    {
        $app = new Strata();
        $app->setClassLoader($loader);

        // Expose the app context to the current process.
        self::$reference = $app;

        return $app;
    }
671273
public function getLoader(GridField $gridField)
    {
        if (!$this->loader) {
            $this->loader = $this->scaffoldLoader($gridField);
        }

        return $this->loader;
    }
983338
protected function getLoader(): LoaderInterface
    {
        if (! $this->loader instanceof LoaderInterface) {
            $this->loader = new CacheLoader(sprintf(
                '%s/%s.php',
                rtrim($this->getCacheLocation(), '/'),
                $this->getCacheFilename()
            ));
        }

        return $this->loader;
    }
511509
private function getLoader()
    {
        if (null == $this->loader) {
            $this->loader = new Twig_Loader_Filesystem(
                $this->locations
            );
        }
        return $this->loader;
    }