Exemple #1
0
 private function processContentLength()
 {
     $length = strlen($this->content());
     if (!$this->headers->has('Content-Length') || $this->headers->fetch('Content-Length') != $length) {
         $this->headers->write('Content-Length', $length);
     }
 }
Exemple #2
0
 /**
  * Checks if a cookie exists.
  *
  * @param string $key
  *
  * @return bool
  */
 public function has(string $key) : bool
 {
     return $this->collection->has($key);
 }