Persists non-session cookies using a JSON formatted file

CloneableInstantiableIterable
ExtendsGuzzleHttp\Cookie\CookieJar
ImplementsCountable
GuzzleHttp\Cookie\CookieJarInterface
IteratorAggregate
Traversable
Methods
public __construct( $cookieFile, $storeSessionCookies = false)
 

Create a new FileCookieJar object

  • throws RuntimeException if the file cannot be found or created
public __destruct()
 

Saves the file when shutting down

public load( $filename)
 

Load cookies from a JSON formatted file.

Old cookies are kept unless overwritten by newly loaded ones.

  • throws RuntimeException if the file cannot be loaded.
public save( $filename)
 

Saves the cookies to a file.

  • throws RuntimeException if the file cannot be found or created
Properties
private $filename
 
  • var string filename
private $storeSessionCookies
 
  • var bool Control whether to persist session cookies or not.
Methods
Methods
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only