/**
  * Constructor.
  *
  * @param  string $json    The JSON body data.
  * @param  int    $status  The status code.
  * @param  array  $headers The custom headers.
  * @param  int    $options Json encode options.
  */
 public function __construct($json = '', $status = 200, array $headers = array(), $options = 0)
 {
     parent::__construct($this->encode($json, $options), $status, $headers);
 }
示例#2
0
 /**
  * Constructor.
  *
  * @param  string  $xml      The XML body data.
  * @param  int     $status   The status code.
  * @param  array   $headers  The custom headers.
  */
 public function __construct($xml = '', $status = 200, array $headers = array())
 {
     parent::__construct($this->toString($xml), $status, $headers);
 }