Class Guzzle\Plugin\Cookie\CookieJar\FileCookieJar

InheritanceGuzzle\Plugin\Cookie\CookieJar\FileCookieJar » Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar
ImplementsGuzzle\Plugin\Cookie\CookieJar\CookieJarInterface, Serializable

Persists non-session cookies using a JSON formatted file

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$cookies array Loaded cookie data Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar
$filename string Filename Guzzle\Plugin\Cookie\CookieJar\FileCookieJar
$strictMode bool Whether or not strict mode is enabled. Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
load() Load the contents of the json formatted file into the data array and discard any unsaved state Guzzle\Plugin\Cookie\CookieJar\FileCookieJar
persist() Save the contents of the data array to the file Guzzle\Plugin\Cookie\CookieJar\FileCookieJar

Property Details

$filename protected property

Filename

protected string $filename null

Method Details

__construct() public method

Create a new FileCookieJar object

public void __construct ( $cookieFile )
$cookieFile string

File to store the cookie data

throws Guzzle\Common\Exception\RuntimeException

if the file cannot be found or created

__destruct() public method

Saves the file when shutting down

public void __destruct ( )
load() protected method

Load the contents of the json formatted file into the data array and discard any unsaved state

protected void load ( )
persist() protected method

Save the contents of the data array to the file

protected void persist ( )
throws Guzzle\Common\Exception\RuntimeException

if the file cannot be found or created