CookieJar
class CookieJar
CookieJar.
Methods
Removes a cookie by name.
Removes all the cookies from the jar.
Updates the cookie jar from a response Set-Cookie headers.
Updates the cookie jar from a Response object.
Returns not yet expired cookie values for the given URI.
Returns not yet expired raw cookie values for the given URI.
Removes all expired cookies.
Details
at line line 23
set(Cookie $cookie)
at line line 42
Cookie|null
get(string $name, string $path = '/', string $domain = null)
Gets a cookie by name.
You should never use an empty domain, but if you do so, this method returns the first cookie for the given name/path (this behavior ensures a BC behavior with previous versions of Symfony).
at line line 76
expire(string $name, string $path = '/', string $domain = null)
Removes a cookie by name.
You should never use an empty domain, but if you do so, all cookies for the given name/path expire (this behavior ensures a BC behavior with previous versions of Symfony).
at line line 106
clear()
Removes all the cookies from the jar.
at line line 117
updateFromSetCookie(array $setCookies, string $uri = null)
Updates the cookie jar from a response Set-Cookie headers.
at line line 146
updateFromResponse(Response $response, string $uri = null)
Updates the cookie jar from a Response object.
at line line 156
Cookie[]
all()
Returns not yet expired cookies.
at line line 180
array
allValues(string $uri, bool $returnsRawValue = false)
Returns not yet expired cookie values for the given URI.
at line line 219
array
allRawValues(string $uri)
Returns not yet expired raw cookie values for the given URI.
at line line 227
flushExpiredCookies()
Removes all expired cookies.