HasAutoloader for composer

This trait 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 array $namespacePool

protected array $psr4Pool

protected array $classMapPool

protected array $includeFilesPool

protected Composer\Autoload\ClassLoader $loader

loader for the primary composer instance.

Public Methods

public autoload()

public autoload(string $vendorPath): void 

autoload is a similar function to including vendor/autoload.php.

Protected Methods

protected initAutoloader()

protected initAutoloader(): void

protected preloadIncludeFilesPool()

protected preloadIncludeFilesPool(): void

protected preloadPools()

protected preloadPools(): void

protected stripVendorDir()

protected stripVendorDir(string $path, $vendorDir): string 

stripVendorDir removes the vendor directory from a path.