49 return $this->cookie->getName();
57 return $this->cookie->getValue();
65 return $this->cookie->getExpires();
73 return $this->cookie->getMaxAge();
81 return $this->cookie->getPath();
89 return $this->cookie->getDomain();
97 return $this->cookie->getSecure();
105 return $this->cookie->getHttpOnly();
110 $samesite = $this->cookie->getSameSite();
111 return is_null($samesite) ? null : $samesite->asString();
119 $clone = clone $this;
120 $clone->cookie = $this->cookie->
withValue($value);
130 $clone = clone $this;
131 $clone->cookie = $this->cookie->
withExpires($expires);
141 $clone = clone $this;
142 $clone->cookie = $this->cookie->rememberForever();
152 $clone = clone $this;
153 $clone->cookie = $this->cookie->
expire();
163 $clone = clone $this;
164 $clone->cookie = $this->cookie->
withMaxAge($maxAge);
174 $clone = clone $this;
185 $clone = clone $this;
186 $clone->cookie = $this->cookie->
withDomain($domain);
196 $clone = clone $this;
197 $clone->cookie = $this->cookie->
withSecure($secure);
207 $clone = clone $this;
208 $clone->cookie = $this->cookie->
withHttpOnly($httpOnly);
215 $clone = clone $this;
216 $clone->cookie = $this->cookie->withSameSite(SameSite::fromString($sameSite));
226 return $this->cookie->__toString();
withPath(string $path=null)
withHttpOnly(bool $httpOnly=null)
withMaxAge(int $maxAge=null)
withMaxAge(int $maxAge=null)
Maximal life time of the cookie in seconds.
getSamesite()
Cookie samesite.
withPath(string $path=null)
Sets the cookie path.
withSecure(bool $secure=null)
Sets if the cookie is a secure cookie or not.
expire()
Expire the cookie.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getImplementation()
Returns the underlying implementation.
withExpires($expires=null)
withValue(string $value=null)
Sets the cookie value.
withHttpOnly(bool $httpOnly=null)
Sets if the cookie is http only.
withDomain(string $domain=null)
withValue(string $value=null)
withSecure(bool $secure=null)
withExpires($expires=null)
Sets the expiration date of the cookie.
__construct(SetCookie $cookie)
CookieFacade constructor.
withSamesite(string $sameSite)
Sets the samesite attribute.
withDomain(string $domain=null)
Sets the domain name for the cookie.