/** * @param array $events */ public function setExpectedEvents(array $events) { $this->occurredEvents = []; $this->expectedEvents = $events; $occurredEvents =& $this->occurredEvents; foreach ($events as $event) { $this->eventer->subscribe($event, function () use($event, &$occurredEvents) { $occurredEvents[] = $event; }); } }
/** * Shutdown App. */ public function shutdown() { if (!$this->started) { return; } $this->started = false; $this->kernel->shutdown(); $this->eventer->dispatch(new KernelShutdownEvent($this->kernel)); $this->eventer->dispatch(new AppShutdownEvent($this)); }
/** * Set up lifecycle events for this provider. */ protected function setUpEvents() { $this->eventer->subscribe(HandleHttpRequestEvent::class, [$this, 'handleHandleHttpRequestEvent']); }