Exemple #1
0
 /**
  * Finalize
  *
  * This prepares this response and returns an array
  * of [status, headers, body]. This array is passed to outer middleware
  * if available or directly to the Yee run method.
  *
  * @return array[int status, array headers, string body]
  */
 public function finalize()
 {
     // Prepare response
     if (in_array($this->status, array(204, 304))) {
         $this->headers->remove('Content-Type');
         $this->headers->remove('Content-Length');
         $this->setBody('');
     }
     return array($this->status, $this->headers, $this->body);
 }