Copied!

Persists non-session cookies using a JSON formatted file

Cloneable Instantiable Iterable
Methods
public __construct ( string $cookieFile , bool $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 ( string $filename ) : void
 

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 ( string $filename ) : void
 

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
© 2020 Bruce Wells
Search Namespaces \ Classes
Configuration Numbers (0-9.) only