Interface CookieJarInterface
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.
-
GuzzleHttp\Cookie\CookieJarInterface
implements
Countable,
IteratorAggregate
Methods summary
public
boolean
|
#
setCookie( GuzzleHttp\Cookie\SetCookie $cookie )
Sets a cookie in the cookie jar.
Sets a cookie in the cookie jar.
Parameters
Returns
boolean Returns true on success or false on failure
|
public
GuzzleHttp\Cookie\CookieJarInterface
|
#
clear( string $domain = null, string $path = null, string $name = null )
Remove cookies currently held in the cookie jar.
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.
Parameters
- $domain
- Clears cookies matching a domain
- $path
- Clears cookies matching a domain and path
- $name
- Clears cookies matching a domain, path, and name
Returns
|
public
|
#
clearSessionCookies( )
Discard all sessions cookies.
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.
|
public
array
|
#
toArray( )
Converts the cookie jar to an array.
Converts the cookie jar to an array.
Returns
array
|
Methods inherited from Countable
count()
|
Methods inherited from IteratorAggregate
getIterator()
|