consolidate notes
[mdref/mdref-http] / http / Cookie / setCookie.md
1 # http\Cookie http\Cookie::setCookie(string $cookie_name, string $cookie_value)
2
3 (Re)set a cookie.
4 See http\Cookie::addCookie() and http\Cookie::setCookies().
5
6 > ***NOTE:***
7 > The cookie will be deleted from the list if $cookie_value is NULL.
8
9 ## Params:
10
11 * string $cookie_name
12 The key of the cookie.
13 * string $cookie_value
14 The value of the cookie.
15
16 ## Returns:
17
18 * http\Cookie, self.
19
20 ## Throws:
21
22 * http\Exception\InvalidArgumentException