Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FileCookieJar.php

function FileCookieJar::__construct

Create a new FileCookieJar object

Parameters

string $cookieFile File to store the cookie data:

bool $storeSessionCookies Set to true to store session cookies: in the cookie jar.

Throws

\RuntimeException if the file cannot be found or created

Overrides CookieJar::__construct

File

vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php, line 31

Class

FileCookieJar
Persists non-session cookies using a JSON formatted file

Namespace

GuzzleHttp\Cookie

Code

public function __construct(string $cookieFile, bool $storeSessionCookies = false) {
    parent::__construct();
    $this->filename = $cookieFile;
    $this->storeSessionCookies = $storeSessionCookies;
    if (\file_exists($cookieFile)) {
        $this->load($cookieFile);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal