/** * 最终输出 */ private static function _finalResponse(array $arrayResponse) { $headers = array('Content-Type' => 'application/xml'); $response = new Response(); $response->setHeaders($headers); $response->setContent(Serialize::encode($arrayResponse, 'xml')); $response->send(); exit; }
/** * 发送消息实体 */ public function send() { $headers = array('Content-Type' => 'application/xml'); $response = new Response($this->getData(), $headers); $response->send(); }