Example #1
0
 protected function sendHeaders()
 {
     if ($this->status != 200 && isset(self::$httpCodes[$this->status])) {
         header(sprintf("%s %s", $this->protocol, self::$httpCodes[$this->status]));
     }
     if (!$this->headers) {
         return;
     }
     if (!$this->headers->has('content-type')) {
         $this->headers->set('content-type', 'text/html; charset=' . $this->charset);
     }
     foreach ($this->headers as $key => $value) {
         header("{$key}: {$value}", true);
     }
 }