Lines Matching defs:cookie
31 * Add a specific cookie.
33 * @see Cookie for description of possible cookie properties
34 * @param Cookie|array $cookie Cookie object. May be also created from array for compatibility reasons.
37 public function addCookie($cookie)
39 if (is_array($cookie)) { // @todo @deprecated remove in 2.0
40 $cookie = Cookie::createFromArray($cookie);
42 if (!$cookie instanceof Cookie) {
48 ['cookie' => $cookie->toArray()]
67 * Delete the cookie with the given name.
83 * Get the cookie with a given name.
86 * @throws NoSuchCookieException In W3C compliant mode if no cookie with the given name is present
87 * @return Cookie|null The cookie, or null in JsonWire mode if no cookie with the given name is present
98 throw new NoSuchCookieException('no such cookie');
105 foreach ($cookies as $cookie) {
106 if ($cookie['name'] === $name) {
107 return $cookie;