ResponseCookieJar
class ResponseCookieJar (View source)
Properties
private bool | $secureDefault | ||
protected Cookie[] | $cookies | The list of new cookies to be added to the response. |
|
protected string[] | $clearedCookies | The names of the request cookies to be cleared out in response. |
Methods
Set the value of the "secure" flag when it is set to null.
Get the value of the "secure" flag when it is set to null.
Adds a Cookie object to the cookie pantry.
Adds a Cookie object to the array of cookies for the object.
The list of new cookies to be added to the response.
Get the response cookie given its name.
There's a cookie with the specific name in the response cookies?
The names of the request cookies to be cleared out in response.
Clear a cookie.
Details
ResponseCookieJar
setSecureDefault(bool $default)
Set the value of the "secure" flag when it is set to null.
bool
isSecureDefault()
Get the value of the "secure" flag when it is set to null.
Cookie
addCookie(string $name, string|null $value = null, int $expire = 0, string $path = '/', null|string $domain = null, bool|null $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null)
Adds a Cookie object to the cookie pantry.
$this
addCookieObject(Cookie $cookie)
Adds a Cookie object to the array of cookies for the object.
Cookie[]
getCookies()
The list of new cookies to be added to the response.
Cookie|null
getCookieByName(string $name)
Get the response cookie given its name.
bool
hasCookie(string $name)
There's a cookie with the specific name in the response cookies?
string[]
getClearedCookies()
The names of the request cookies to be cleared out in response.
$this
clear(string $name)
Clear a cookie.