Symfony\Component\HttpFoundation\Cookie::isHttpOnly PHP Method

isHttpOnly() public method

Checks whether the cookie will be made accessible only through the HTTP protocol.
public isHttpOnly ( ) : boolean
return boolean
    public function isHttpOnly()
    {
        return $this->httpOnly;
    }

Usage Example

 /**
  * Set the given cookie in the headers.
  *
  * @param  \Symfony\Component\HttpFoundation\Cookie  $cookie
  * @return void
  */
 protected function setCookie($cookie)
 {
     if (headers_sent()) {
         return;
     }
     setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), Config::get('session.secure'), $cookie->isHttpOnly());
 }
All Usage Examples Of Symfony\Component\HttpFoundation\Cookie::isHttpOnly