/** * response message entity */ public function setResponse(Entity $entity) { $body = $entity->getBody(); $body['ToUserName'] = $this['FromUserName']; $body['FromUserName'] = $this['ToUserName']; $body['MsgType'] = $entity->getType(); $body['CreateTime'] = time(); $response = new XmlResponse($body); $response->send(); }
/** * 响应 Xml */ protected function xmlResponse(array $options) { $response = new XmlResponse($options); $response->send(); }