public static initializePackageManagement ( |
||
$bootstrap | ||
return | void |
public static function initializePackageManagement(Bootstrap $bootstrap)
{
$packageManager = new PackageManager();
$bootstrap->setEarlyInstance(PackageManagerInterface::class, $packageManager);
// The package:rescan must happen as early as possible, compiletime alone is not enough.
if (isset($_SERVER['argv'][1]) && in_array($_SERVER['argv'][1], ['neos.flow:package:rescan', 'flow:package:rescan'])) {
$packageManager->rescanPackages();
}
$packageManager->initialize($bootstrap);
$bootstrap->getEarlyInstance(ClassLoader::class)->setPackages($packageManager->getActivePackages());
}
/** * Bootstraps the minimal infrastructure, resolves a fitting request handler and * then passes control over to that request handler. * * @return void * @api */ public function run() { Scripts::initializeClassLoader($this); Scripts::initializeSignalSlot($this); Scripts::initializePackageManagement($this); $this->activeRequestHandler = $this->resolveRequestHandler(); $this->activeRequestHandler->handleRequest(); }