Cookie jar that stores cookies as an array
Cloneable
Instantiable
Iterable
- Children
-
Implements
Countable GuzzleHttp\Cookie\CookieJarInterface IteratorAggregate Traversable
Methods |
public
__construct
(
bool
$strictMode
=
false
,
array
$cookieArray
=
[
]
) |
public
clear
(
?
string
$domain
=
NULL
,
?
string
$path
=
NULL
,
?
string
$name
=
NULL
) :
void
|
public
clearSessionCookies
() :
void
|
public count () : int |
public extractCookies ( Psr\Http\Message\RequestInterface $request , Psr\Http\Message\ResponseInterface $response ) : void |
public
static
fromArray
(
array
$cookies
,
string
$domain
) :
self
Create a new Cookie jar from an associative array and domain. |
public
getCookieByName
(
string
$name
) : ?
GuzzleHttp\Cookie\SetCookie
Finds and returns the cookie based on the name
|
public
getIterator
() :
ArrayIterator
|
public
setCookie
(
GuzzleHttp\Cookie\SetCookie
$cookie
) :
bool
|
public
static
shouldPersist
(
GuzzleHttp\Cookie\SetCookie
$cookie
,
bool
$allowSessionCookies
=
false
) :
bool
Evaluate if this cookie should be persisted to storage |
public
toArray
() :
array
|
public withCookieHeader ( Psr\Http\Message\RequestInterface $request ) : Psr\Http\Message\RequestInterface |
Properties |
private
$cookies
|
private
$strictMode
|
Methods |
private
getCookiePathFromRequest
(
Psr\Http\Message\RequestInterface
$request
) :
string
Computes cookie path following RFC 6265 section 5.1.4 |
private
removeCookieIfEmpty
(
GuzzleHttp\Cookie\SetCookie
$cookie
) :
void
If a cookie already exists and the server asks to set it again with a |
Methods |
public
static
fromArray
(
array
$cookies
,
string
$domain
) :
self
Create a new Cookie jar from an associative array and domain. |
public
static
shouldPersist
(
GuzzleHttp\Cookie\SetCookie
$cookie
,
bool
$allowSessionCookies
=
false
) :
bool
Evaluate if this cookie should be persisted to storage |