/** * 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()); }
/** * {@inheritdoc} */ public function matchCookie(CookieContract $cookie) : bool { return $this->getName() === $cookie->getName() && $this->getDomain() === $cookie->getDomain() && $this->getPath() === $cookie->getPath(); }