Open Journal Systems
3.3.0
|
Public Member Functions | |
clear ($domain=null, $path=null, $name=null) | |
clearSessionCookies () | |
extractCookies (RequestInterface $request, ResponseInterface $response) | |
setCookie (SetCookie $cookie) | |
toArray () | |
withCookieHeader (RequestInterface $request) | |
Stores HTTP cookies.
It extracts cookies from HTTP requests, and returns them in HTTP responses. CookieJarInterface instances automatically expire contained cookies when necessary. Subclasses are also responsible for storing and retrieving cookies from a file, database, etc.
Definition at line 17 of file vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php.
GuzzleHttp\Cookie\CookieJarInterface::clear | ( | $domain = null , |
|
$path = null , |
|||
$name = null |
|||
) |
Remove cookies currently held in the cookie jar.
Invoking this method without arguments will empty the whole cookie jar. If given a $domain argument only cookies belonging to that domain will be removed. If given a $domain and $path argument, cookies belonging to the specified path within that domain are removed. If given all three arguments, then the cookie with the specified name, path and domain is removed.
string | null | $domain | Clears cookies matching a domain |
string | null | $path | Clears cookies matching a domain and path |
string | null | $name | Clears cookies matching a domain, path, and name |
Implemented in GuzzleHttp\Cookie\CookieJar.
GuzzleHttp\Cookie\CookieJarInterface::clearSessionCookies | ( | ) |
Discard all sessions cookies.
Removes cookies that don't have an expire field or a have a discard field set to true. To be called when the user agent shuts down according to RFC 2965.
Implemented in GuzzleHttp\Cookie\CookieJar.
GuzzleHttp\Cookie\CookieJarInterface::extractCookies | ( | RequestInterface | $request, |
ResponseInterface | $response | ||
) |
Extract cookies from an HTTP response and store them in the CookieJar.
RequestInterface | $request | Request that was sent |
ResponseInterface | $response | Response that was received |
Implemented in GuzzleHttp\Cookie\CookieJar.
GuzzleHttp\Cookie\CookieJarInterface::setCookie | ( | SetCookie | $cookie | ) |
Sets a cookie in the cookie jar.
Implemented in GuzzleHttp\Cookie\CookieJar.
GuzzleHttp\Cookie\CookieJarInterface::toArray | ( | ) |
GuzzleHttp\Cookie\CookieJarInterface::withCookieHeader | ( | RequestInterface | $request | ) |
Create a request with added cookie headers.
If no matching cookies are found in the cookie jar, then no Cookie header is added to the request and the same request is returned.
RequestInterface | $request | Request object to modify. |
Implemented in GuzzleHttp\Cookie\CookieJar.