/** * @return void */ public function boot() { if (!$this->isBooted()) { $this->prepareModules(); $this->container = $this->containerInitializer->initializeContainer($this); foreach ($this->modules as $module) { $module->boot($this); } $this->booted = true; } }
/** * @return void */ public function boot() { if (!$this->booted) { $this->prepareModules(); $this->container = $this->containerInitializer->initializeContainer($this); $this->dispatcher = $this->container->get("event_dispatcher"); $this->taskCollection = $this->container->get("kernel.task_collection"); $this->dispatcher->dispatch(KernelEvents::AFTER_CONTAINER_INITIALIZATION, $this->kernelEvent); $this->dispatcher->dispatch(KernelEvents::BEFORE_MODULES_BOOT, $this->kernelEvent); foreach ($this->modules as $module) { $module->boot($this); } $this->dispatcher->dispatch(KernelEvents::AFTER_MODULES_BOOT, $this->kernelEvent); $this->booted = true; } }