Create a new instance from an `AssetsManager\Loader` instance

@param \AssetsManager\Loader $loader
@return object
334546
public static function createFromAssetsLoader(AssetsLoader $loader)
    {
        $_class = get_called_class();
        return new $_class(
            $loader->getRootDirectory(),
            $loader->getAssetsDirectory(),
            $loader->getVendorDirectory(),
            $loader->getAssetsVendorDirectory()
        );
    }
1231352
protected function loadManager($loader, ContainerBuilder $container, array $config)
    {
        if (isset($config['manager']['class'])) {
            $container->setParameter('snide_travinizer.repo_manager.class', $config['manager']['class']);
        }
    }
546361
protected function createContainer(ContainerModuleLoader $loader, ScopeLoader $scopes)
	{
		$contextCachePath = $this->cacheDirectory . DIRECTORY_SEPARATOR . $this->contextName;
		$cacheFile = $contextCachePath . DIRECTORY_SEPARATOR . 'container.php';
		
		$containerTypeName = __NAMESPACE__ . '\\CompiledContainer';
		$proxyPath = Filesystem::createDirectory($contextCachePath . DIRECTORY_SEPARATOR . 'scoped');
		
		$scopedProxies = [];
		
		foreach($scopes as $scope)
		{
			foreach($scope->getProxyTypeNames() as $typeName)
			{
				$scopedProxies[] = $typeName;
			}
		}
		
		if(!is_file($cacheFile) || $this->cache->isModified())
		{
			$builder = $this->createContainerBuilder();
			
			foreach($this->komponents as $komponent)
			{
				$komponent->build($builder);
			}
			
			foreach($loader as $module)
			{
				$module->build($builder);
			}
			
			$this->build($builder);
			
			if($this->isInstrumentationEnabled())
			{
				$manager = $this->getManifest();
			}
			else
			{
				$manager = new ReflectionTypeInfoManager();
			}
			
			$compiler = new ContainerCompiler($manager, $containerTypeName);
			$code = $compiler->compile($builder, $proxyPath, $scopedProxies);
				
			Filesystem::writeFile($cacheFile, $code);
		}
		
		require_once $cacheFile;
		
		return new $containerTypeName($this->getContainerParams());
	}
367723
private function _getHelper($helper)
  {
    $instance = null;
    foreach ($this->_prefixes as $prefix) {
      $className = $prefix . "\\" . $helper;
      if (Loader::loadClass($className)) {
        if (is_subclass_of($className, __NAMESPACE__ . "\\Helper_Interface")) {
          $instance = new $className();
          /* @var $instance Helper_Interface */
          $instance->setSubject($this->_subject);
        }
        break;
      }
    }
    return $instance;
  }
908005
public static function create($data = null, $transformer = null, $serializer = null)
    {
        $instance = new static(new Manager());

        $instance->data = $data;
        $instance->dataType = $instance->determineDataType($data);
        $instance->transformer = $transformer ?: null;
        $instance->serializer = $serializer ?: null;

        return $instance;
    }
990636
public static Object instance(String clsName,ClassLoader loader)
	{
		try
		{
			return Class.forName(clsName,true,loader).newInstance();
		}
		catch (InstantiationException e)
		{
			throw new RuntimeException(e);
		}
		catch (IllegalAccessException e)
		{
			throw new RuntimeException(e);
		}
		catch (ClassNotFoundException e)
		{
			throw new RuntimeException(e);
		}
	}
293760
public function addListenerLoader(LoaderInterface $loader)
	{
		if (!isset($this->loaders[$loader->getName()]))
		{
			//$loader->setDispatcher($this);

			$this->loaders[$loader->getName()] = $loader;
		}

		return $this;
	}
248480
public function loadConfiguration(ConfigurationLoader $loader, array $params = [])
	{
		try
		{
			$data = $loader->findLoader($this->source)->load($this->source, $params);
			
			return new Configuration($this->createBase($data));
		}
		catch(\Exception $e)
		{
			throw new ConfigurationLoadingException(sprintf('Unable to load config from source "%s"', $this->source->getPathname()), 0, $e);
		}
	}
922620
protected function initializeFileLoader(FileLoader $fileLoader = null)
    {
        if (!isset($this->fileLoader)) {
            $this->setFileLoader(($fileLoader) ? $fileLoader : new FileLoader());
        }
    }
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;
    }
1157374
public function addLoaders(array $loaders) {
        foreach ($loaders as $loader) {
            if (is_string($loader)) {
                $loader = new $loader();
            }

            if (!$loader instanceof InputLoaderInterface) {
                $name = is_object($loader) ? get_class($loader) : (string) $loader;
                throw new InvalidArgumentException('Given loader (' . $name . ') does not implement LoaderInterface', 500);
            }

            $this->registerLoader($loader);
        }

        return $this;
    }
509213
public function importer($importer)
    {
        if ($importer instanceof ImporterContract) {
            $this->importer = $importer;
        } else {
            $this->importer = $this->getImporter($importer);
        }

        return $this;
    }
220393
public static function instance(Autoload\ClassLoader $classLoader = null): self
    {
        static $instance;
        if (!$instance) {
            $instance = new self($classLoader);
        }
        return $instance;
    }
865361
private static function getLoader()
    {
        if (self::isNull(self::$loader)) {
            self::$loader = Loader::getImageLoader(Image::getConfig());
        }

        return self::$loader;
    }
178616
public function import(array $loader)
    {
        $this->loader = $loader;
        foreach ($loader as $alias => $namespace) {
            $alias = $this->alias($alias);
            $this->container->set($alias, function ($c) use ($alias, $namespace) {
                if (is_callable([$namespace, 'make'])) {
                    call_user_func_array($namespace . '::make', [$alias, $c]);
                }

                return new $namespace();
            });
        }
    }
640077
public function loadAssetHandler($assetHandler)
    {
        if (!$assetHandler instanceof AssetHandler) {
            throw new AssetManagerException('Asset handler "' . get_class($assetHandler) . '" is not supported by AssetManager');
        }
        $this->assetHandlers[] = $assetHandler;
        return $this;
    }
745370
public function newInstance()
    {
        // Set the file locators in each loader instance.
        foreach($this->loaders as $loader) {
            if(false === $loader instanceof LoaderInterface) {
                throw new \InvalidArgumentException("Loaders must implement Affiniti\Config\Loader\LoaderInterface.");
            }
            
            $loader->setLocator($this->fileLocator);
        }
        
        return new DelegatingLoader(new LoaderResolver($this->loaders));
    }