Example #1
0
 /**
  * Called by dispatcher after action method was called
  */
 public function afterAction()
 {
     //
     if (empty($this->response)) {
         //
         $isNeedRender = !empty($this->view) && !$this->view->isRendered();
         //
         $this->response = new HttpResponse();
         //
         if ($isNeedRender) {
             //
             $this->response->setData($this->view->render());
         } else {
         }
     }
     //
     if (!$this->response->isSent()) {
         //
         $this->response->send();
     }
 }