Ejemplo n.º 1
0
 /**
  * Cookie değerlerini atar
  */
 public function __construct()
 {
     parent::__construct();
     $get = $this->headers;
     if (isset($get['Cookie'])) {
         $this->cookies = $this->rendeCookieString($get['Cookie']);
     } else {
         $this->cookies = [];
     }
 }
 /**
  * Server Değişkenindeki Http headerleri atar.
  */
 public function __construct()
 {
     parent::__construct();
     $headers = [];
     foreach ($this->getServer() as $name => $value) {
         if (substr($name, 0, 5) == 'HTTP_') {
             $name = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));
             $headers[$name] = $value;
         } else {
             if ($name == "CONTENT_TYPE") {
                 $headers["Content-Type"] = $value;
             } else {
                 if ($name == "CONTENT_LENGTH") {
                     $headers["Content-Length"] = $value;
                 }
             }
         }
     }
     $this->headers = array_merge($this->getHeaders(), $headers);
 }