/** * @return BootstrapInterface */ protected function getBootstrapInstance() : BootstrapInterface { if (!$this->info->installMode()) { return require $this->info->bootstrapFile(); } return new class implements BootstrapInterface { public function bootstrap(DefaultCollectorInterface $app) { $app->setCacheDriver(new MemoryDriver())->setConfigDriver(new EphemeralConfig())->setDefaultLogger(new NullLogger())->setSessionHandler(new \SessionHandler()); } }; }
/** * @param Event $event */ public function handleDumpAutoload(Event $event) { $installMode = true; $installed = $enabled = []; if (!$this->appInfo->installMode()) { $installMode = false; $collector = new DefaultCollector($this->appInfo); /** @var \Opis\Colibri\BootstrapInterface $bootstrap */ $bootstrap = (require $this->appInfo->bootstrapFile()); $bootstrap->bootstrap($collector); $installed = $collector->getInstalledModules(); $enabled = $collector->getEnabledModules(); } $this->preparePacks($installMode, $enabled, $installed); $this->copyAssets($enabled); }