Exemplo n.º 1
0
 /**
  * @desc
  * @param type $status
  * @param string $body
  * @param type $content_type
  */
 public function sendResponse($status = 200, $bodyParams = array())
 {
     if ($status != 200) {
         $bodyParams = CMap::mergeArray($bodyParams, $this->response->getErrorMessage($status));
     }
     $this->response->setStatus($status);
     $this->sendHeaders();
     echo $this->response->setParams($bodyParams)->getBody();
     Yii::app()->end();
 }