Наследование: implements Icicle\Http\Message\Cookie\Cookie
Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function toHeader() : string
 {
     $line = parent::toHeader();
     if (0 !== $this->expires) {
         $line .= '; Expires=' . $this->encodeDate($this->expires);
     }
     if ('' !== $this->path) {
         $line .= '; Path=' . $this->encodePath($this->path);
     }
     if ('' !== $this->domain) {
         $line .= '; Domain=' . $this->domain;
     }
     if ($this->secure) {
         $line .= '; Secure';
     }
     if ($this->httpOnly) {
         $line .= '; HttpOnly';
     }
     return $line;
 }