46 return $this->cookie->getName();
54 return $this->cookie->getValue();
62 return $this->cookie->getExpires();
70 return $this->cookie->getMaxAge();
78 return $this->cookie->getPath();
86 return $this->cookie->getDomain();
94 return $this->cookie->getSecure();
102 return $this->cookie->getHttpOnly();
107 $samesite = $this->cookie->getSameSite();
108 return is_null($samesite) ?
null : $samesite->asString();
116 $clone = clone $this;
117 $clone->cookie = $this->cookie->
withValue($value);
127 $clone = clone $this;
128 $clone->cookie = $this->cookie->
withExpires($expires);
138 $clone = clone $this;
139 $clone->cookie = $this->cookie->rememberForever();
149 $clone = clone $this;
150 $clone->cookie = $this->cookie->
expire();
160 $clone = clone $this;
161 $clone->cookie = $this->cookie->
withMaxAge($maxAge);
171 $clone = clone $this;
182 $clone = clone $this;
183 $clone->cookie = $this->cookie->
withDomain($domain);
193 $clone = clone $this;
194 $clone->cookie = $this->cookie->
withSecure($secure);
204 $clone = clone $this;
205 $clone->cookie = $this->cookie->
withHttpOnly($httpOnly);
212 $clone = clone $this;
213 $clone->cookie = $this->cookie->withSameSite(SameSite::fromString($sameSite));
223 return $this->cookie->__toString();
233 return $this->cookie;
getSamesite()
Cookie samesite.
withMaxAge(?int $maxAge=null)
expire()
Expire the cookie.
withDomain(?string $domain=null)
withValue(?string $value=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
withPath(?string $path=null)
Sets the cookie path.
getImplementation()
Returns the underlying implementation.
withExpires($expires=null)
withSecure(?bool $secure=null)
withHttpOnly(?bool $httpOnly=null)
Sets if the cookie is http only.
withSecure(?bool $secure=null)
Sets if the cookie is a secure cookie or not.
withMaxAge(?int $maxAge=null)
Maximal life time of the cookie in seconds.
__construct(private SetCookie $cookie)
CookieFacade constructor.
withHttpOnly(?bool $httpOnly=null)
withDomain(?string $domain=null)
Sets the domain name for the cookie.
withValue(?string $value=null)
Sets the cookie value.
withExpires($expires=null)
Sets the expiration date of the cookie.
withSamesite(string $sameSite)
Sets the samesite attribute.
withPath(?string $path=null)