xmlEncode() public static méthode

xml encode
public static xmlEncode ( $data, array $context = [] )
$context array
Exemple #1
0
 /**
  * Request Xml Body
  */
 public function withXmlBody(array $body)
 {
     $this->body = Serializer::xmlEncode($body);
     return $this;
 }
Exemple #2
0
 /**
  * 构造方法
  */
 public function __construct(array $options, array $headers = array(), $status = 200)
 {
     $content = Serializer::xmlEncode($options);
     $headers = array_replace($headers, array('Content-Type' => 'application/xml'));
     parent::__construct($content, $status, $headers);
 }