Inheritance: extends Symfony\Component\HttpFoundation\Response
Example #1
0
 /**
  * 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();
 }
Example #2
0
 /**
  * 响应 Xml
  */
 protected function xmlResponse(array $options)
 {
     $response = new XmlResponse($options);
     $response->send();
 }