25 $this->cookies[$cookie->getName()] = $cookie;
35 return isset($this->cookies[
$name]);
48 return $this->cookies[
$name];
56 return array_values($this->cookies);
65 $clone = clone($this);
67 $clone->cookies[$cookie->
getName()] = $cookie;
78 $clone = clone($this);
80 if (! $clone->has(
$name)) {
84 unset($clone->cookies[
$name]);
97 $cookieString = implode(
'; ', $this->cookies);
99 $request = $request->
withHeader(static::COOKIE_HEADER, $cookieString);
123 $cookieString = $request->
getHeaderLine(static::COOKIE_HEADER);
125 return static::fromCookieString($cookieString);
static listFromCookieString($string)
Create a list of Cookies from a Cookie header value string.
static fromCookieString($string)
Create Cookies from a Cookie header value string.
foreach($paths as $path) $request
withHeader($name, $value)
Return an instance with the provided value replacing the specified header.
__construct(array $cookies=[])
const COOKIE_HEADER
The name of the Cookie header.
Representation of an outgoing, client-side request.
static fromRequest(RequestInterface $request)
Create Cookies from a Request.
renderIntoCookieHeader(RequestInterface $request)
Render Cookies into a Request.
getHeaderLine($name)
Retrieves a comma-separated string of the values for a single header.