Overview

Namespaces

  • Baguette
    • Mastodon
      • Config
      • Entity
      • Grant
      • Service
  • GuzzleHttp
    • Cookie
    • Exception
    • Handler
    • Promise
  • Psr
    • Http
      • Message
  • Teto
    • Object

Classes

  • CookieJar
  • FileCookieJar
  • SessionCookieJar
  • SetCookie

Interfaces

  • CookieJarInterface
  • Overview
  • Namespace
  • Class

Class FileCookieJar

Persists non-session cookies using a JSON formatted file

GuzzleHttp\Cookie\CookieJar implements GuzzleHttp\Cookie\CookieJarInterface
Extended by GuzzleHttp\Cookie\FileCookieJar
Namespace: GuzzleHttp\Cookie
Located at Cookie/FileCookieJar.php
Methods summary
public
# __construct( string $cookieFile, boolean $storeSessionCookies = false )

Create a new FileCookieJar object

Create a new FileCookieJar object

Parameters

$cookieFile
File to store the cookie data
$storeSessionCookies

Set to true to store session cookies in the cookie jar.

Throws

RuntimeException
if the file cannot be found or created

Overrides

GuzzleHttp\Cookie\CookieJar::__construct()
public
# __destruct( )

Saves the file when shutting down

Saves the file when shutting down

public
# save( string $filename )

Saves the cookies to a file.

Saves the cookies to a file.

Parameters

$filename
File to save

Throws

RuntimeException
if the file cannot be found or created
public
# load( string $filename )

Load cookies from a JSON formatted file.

Load cookies from a JSON formatted file.

Old cookies are kept unless overwritten by newly loaded ones.

Parameters

$filename
Cookie file to load.

Throws

RuntimeException
if the file cannot be loaded.
Methods inherited from GuzzleHttp\Cookie\CookieJar
clear(), clearSessionCookies(), count(), extractCookies(), fromArray(), getCookieValue(), getIterator(), setCookie(), shouldPersist(), toArray(), withCookieHeader()
ξ ^ω^)ξ Baguette PHP Mastodon API Client / SDK API documentation generated by ApiGen