Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function send()
 {
     parent::send();
     header("Content-Type: application/json");
     $payload = $this->getData();
     $payload = empty($payload) ? "{}" : json_encode($payload, $this->encodeOptions);
     header("Content-Length: " . strlen($payload));
     echo $payload;
 }
Beispiel #2
0
 /**
  * {@inheritdoc}
  */
 public function send()
 {
     parent::send();
     header("Content-Length: " . filesize($this->path));
     readfile($this->path);
 }
Beispiel #3
0
 /**
  * {@inheritdoc}
  */
 public function send()
 {
     parent::send();
     header("Content-Length: " . strlen($this->body));
     echo $this->body;
 }