21use Dflydev\FigCookies\SetCookies;
22use Psr\Http\Message\ResponseInterface;
47 public function has(
string $name): bool
49 return $this->cookies->has($name);
56 public function get(
string $name): ?
Cookie
58 $cookie = $this->cookies->get($name);
60 return (is_null($cookie)) ?
null :
new CookieWrapper($cookie);
70 foreach ($this->cookies->getAll() as $cookie) {
74 return $wrappedCookies;
86 $wrapper = $setCookie;
87 $internalCookie = $wrapper->getImplementation();
90 $clone->cookies = $this->cookies->with($internalCookie);
101 $clone = clone $this;
102 $clone->cookies = $this->cookies->
without($name);
113 return $this->cookies->renderIntoSetCookieHeader(
$response);
renderIntoResponseHeader(ResponseInterface $response)
@inheritDoc
has(string $name)
@inheritDoc
__construct(private SetCookies $cookies)
CookieJarWrapper constructor.
without(string $name)
@inheritDoc
with(Cookie $setCookie)
Creates a new cookie jar with the given cookie.
without(string $name)
Creates a cookie jar without the specified cookie.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...