示例#1
0
 /**
  * @return Response\Http
  */
 public function getResponse()
 {
     if ($this->_request->isDispatched() && $this->_request->isAjax()) {
         $this->_response->setHeader('Content-Type', 'application/json, text/xml, text/html; charset=UTF-8', true);
     }
     return $this->_response;
 }
示例#2
0
文件: Http.php 项目: robotr/mvcDemo
 /**
  * {@inheritdoc}
  */
 public function __construct(RequestAbstract $request)
 {
     parent::__construct($request);
     $this->_headers['Content-Type'] = 'text/html; charset=UTF-8';
 }