1 # http\Env\Response http\Env\Response::setCookie(mixed $cookie)
3 Add cookies to the response to send.
12 * http\Env\Response, self.
16 * http\Exception\InvalidArgumentException
17 * http\Exception\UnexpectedValueException
23 $r = new http\Env\Response;
24 $r->setCookie("visit=true; path=/");
32 Set-Cookie: visit=true; path=/;
40 $c->addCookie("foo", "bar");
42 $c->setDomain(".example.org");
44 $c->setFlags(http\Cookie::SECURE | http\Cookie::HTTPONLY);
46 $r = new http\Env\Response;
55 Set-Cookie: foo=bar; domain=.example.org; path=/; max-age=360; secure; httpOnly;