예제 #1
0
 /**
  * Duplicate a cookie with a new value.
  *
  * @param \Viserio\Contracts\Cookie\Cookie $cookie
  * @param string                           $value
  *
  * @return \Viserio\Contracts\Cookie\Cookie
  */
 protected function duplicate(CookieContract $cookie, string $value) : CookieContract
 {
     return new Cookie($cookie->getName(), $value, $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly());
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function matchCookie(CookieContract $cookie) : bool
 {
     return $this->getName() === $cookie->getName() && $this->getDomain() === $cookie->getDomain() && $this->getPath() === $cookie->getPath();
 }