示例#1
0
 /**
  * Send the response to the client
  * @return null
  */
 private function sendResponse()
 {
     $this->eventManager->runEvent(self::EVENT_PRE_RESPONSE);
     $statusCode = $this->response->getStatusCode();
     $headers = $this->response->getHeaders();
     $this->sendHeaders($statusCode, $headers);
     if (!$this->response->willRedirect()) {
         $view = $this->response->getView();
         if (!empty($view)) {
             $view->render(false);
         }
     }
     $this->eventManager->runEvent(self::EVENT_POST_RESPONSE);
 }
 /**
  * @dataProvider providerRunEventWithInvalidEventThrowsException
  * @expectedException zibo\ZiboException
  */
 public function testRunEventWithInvalidEventThrowsException($event)
 {
     $this->eventManager->triggerEvent($event);
 }