Open Journal Systems  3.3.0
GuzzleHttp\Cookie\SessionCookieJar Class Reference
Inheritance diagram for GuzzleHttp\Cookie\SessionCookieJar:
GuzzleHttp\Cookie\CookieJar GuzzleHttp\Cookie\CookieJarInterface

Public Member Functions

 __construct ($sessionKey, $storeSessionCookies=false)
 
 __destruct ()
 
 save ()
 
- Public Member Functions inherited from GuzzleHttp\Cookie\CookieJar
 clear ($domain=null, $path=null, $name=null)
 
 clearSessionCookies ()
 
 count ()
 
 extractCookies (RequestInterface $request, ResponseInterface $response)
 
 getCookieByName ($name)
 
 getIterator ()
 
 setCookie (SetCookie $cookie)
 
 toArray ()
 
 withCookieHeader (RequestInterface $request)
 

Protected Member Functions

 load ()
 

Additional Inherited Members

- Static Public Member Functions inherited from GuzzleHttp\Cookie\CookieJar
static fromArray (array $cookies, $domain)
 
static getCookieValue ($value)
 
static shouldPersist (SetCookie $cookie, $allowSessionCookies=false)
 

Detailed Description

Persists cookies in the client session

Definition at line 7 of file SessionCookieJar.php.

Constructor & Destructor Documentation

◆ __construct()

GuzzleHttp\Cookie\SessionCookieJar::__construct (   $sessionKey,
  $storeSessionCookies = false 
)

Create a new SessionCookieJar object

Parameters
string$sessionKeySession key name to store the cookie data in session
bool$storeSessionCookiesSet to true to store session cookies in the cookie jar.

Reimplemented from GuzzleHttp\Cookie\CookieJar.

Definition at line 29 of file SessionCookieJar.php.

References GuzzleHttp\Cookie\SessionCookieJar\load().

◆ __destruct()

GuzzleHttp\Cookie\SessionCookieJar::__destruct ( )

Saves cookies to session when shutting down

Definition at line 40 of file SessionCookieJar.php.

References GuzzleHttp\Cookie\SessionCookieJar\save().

Member Function Documentation

◆ load()

GuzzleHttp\Cookie\SessionCookieJar::load ( )
protected

Load the contents of the client session into the data array

Definition at line 64 of file SessionCookieJar.php.

References GuzzleHttp\json_decode(), and GuzzleHttp\Cookie\CookieJar\setCookie().

Referenced by GuzzleHttp\Cookie\SessionCookieJar\__construct().

◆ save()

GuzzleHttp\Cookie\SessionCookieJar::save ( )

Save cookies to the client session

Definition at line 48 of file SessionCookieJar.php.

References GuzzleHttp\json_encode(), and GuzzleHttp\Cookie\CookieJar\shouldPersist().

Referenced by GuzzleHttp\Cookie\SessionCookieJar\__destruct().


The documentation for this class was generated from the following file: