all() public method

public all ( )
Example #1
1
 /**
  * Sends HTTP headers.
  */
 public function sendHeaders()
 {
     if (!$this->headers->has('Content-Type')) {
         $this->headers->set('Content-Type', 'text/html; charset=' . (null === $this->charset ? 'UTF-8' : $this->charset));
     }
     // status
     header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));
     // headers
     foreach ($this->headers->all() as $name => $values) {
         foreach ($values as $value) {
             header($name . ': ' . $value);
         }
     }
     // cookies
     foreach ($this->headers->getCookies() as $cookie) {
         setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
     }
 }
Example #2
1
 /**
  * Sends HTTP headers.
  */
 public function sendHeaders()
 {
     // headers have already been sent by the developer
     if (headers_sent()) {
         return;
     }
     // status
     header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));
     // headers
     foreach ($this->headers->all() as $name => $values) {
         foreach ($values as $value) {
             header($name . ': ' . $value, false);
         }
     }
     // cookies
     foreach ($this->headers->getCookies() as $cookie) {
         setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
     }
 }
Example #3
-1
 /**
  * Sends HTTP headers.
  */
 public function sendHeaders()
 {
     $this->fixContentType();
     // status
     header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText));
     // headers
     foreach ($this->headers->all() as $name => $values) {
         foreach ($values as $value) {
             header($name . ': ' . $value, false);
         }
     }
     // cookies
     foreach ($this->headers->getCookies() as $cookie) {
         setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
     }
 }