System\Classes\ComposerManager

Source: ~/modules/system/classes/ComposerManager.php

Composer manager

This class manages composer packages introduced by plugins. Each loaded package is added to a global pool to ensure a package is not loaded twice by the composer instance introduced by a plugin. This class is used as a substitute for the vendor/autoload.php file.

Protected properties

protected $namespacePool

protected $psr4Pool

protected $classMapPool

protected $includeFilesPool

protected Composer\Autoload\ClassLoader $loader

The primary composer instance.

protected static $instance

Public methods

public void __clone()

public void __wakeup()

public void autoload(string $vendorPath)

Similar function to including vendor/autoload.php.

Parameters
  • string $vendorPath - Absoulte path to the vendor directory.

public static void forgetInstance()

Forget this singleton's instance if it exists

public void init()

public static void instance()

Create a new instance of this singleton.

Protected methods

protected void __construct()

Constructor.

protected void preloadIncludeFilesPool()

protected void preloadPools()

protected string stripVendorDir(string $path, $vendorDir)

Removes the vendor directory from a path.

Parameters
  • string $path
  • $vendorDir