コード例 #1
0
 /**
  * @dataProvider providerRunEventWithInvalidEventThrowsException
  * @expectedException zibo\ZiboException
  */
 public function testRunEventWithInvalidEventThrowsException($event)
 {
     $this->eventManager->triggerEvent($event);
 }
コード例 #2
0
ファイル: Zibo.php プロジェクト: BGCX261/zibo-svn-to-git
 /**
  * Sends the response to the client
  * @return null
  */
 protected function sendResponse()
 {
     $this->eventManager->triggerEvent(self::EVENT_PRE_RESPONSE, $this);
     $statusCode = $this->response->getStatusCode();
     $headers = $this->response->getHeaders();
     $this->sendHeaders($statusCode, $headers);
     if (!$this->response->willRedirect()) {
         $view = $this->response->getView();
         if ($view) {
             $view->render(false);
         }
     }
     $this->eventManager->triggerEvent(self::EVENT_POST_RESPONSE, $this);
 }