예제 #1
0
 /**
  * @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;
         });
     }
 }
예제 #2
0
파일: App.php 프로젝트: weew/app
 /**
  * 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']);
 }