1 # void http\Cookie::__construct([mixed $cookies = NULL[, int $flags = 0[, array $allowed_extras = NULL]]])
3 Create a new cookie list.
7 * Optional mixed $cookies = NULL
8 The string or list of cookies to parse or set.
9 * Optional int $flags = 0
10 Parse flags. See http\Cookie::PARSE_* constants.
11 * Optional array $allowed_extras = NULL
12 List of extra attribute names to recognize.
16 * http\Exception\InvalidArgumentException
17 * http\Exception\RuntimeException
22 $cookie = new http\Cookie("c1=v1; c2=v2; extra=foo; ".
23 "expires=Thu, Nov 7 2013 10:00:00 GMT; path=/a/b/c",
26 "cookies" => $cookie->getCookies(),
27 "extras" => $cookie->getExtras(),
28 "expires" => $cookie->getExpires(),
29 "max-age" => $cookie->getMaxAge(),
30 "domain" => $cookie->getDomain(),
31 "path" => $cookie->getPath(),
32 "flags" => $cookie->getFlags(),
33 "string" => (string) $cookie
63 string(77) "c1=v1; c2=v2; path=/a/b/c; expires=Thu, 07 Nov 2013 10:00:00 GMT; extra=foo; "