Esempio n. 1
0
 /**
  * @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());
         }
     };
 }
Esempio n. 2
0
 /**
  * @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);
 }