You are here

public function CookieJar::__construct in Lockr 7.3

Parameters

bool $strictMode Set to true to throw exceptions when invalid: cookies are added to the cookie jar.

array $cookieArray Array of SetCookie objects or a hash of: arrays that can be used with the SetCookie constructor

2 methods override CookieJar::__construct()
FileCookieJar::__construct in vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php
Create a new FileCookieJar object
SessionCookieJar::__construct in vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php
Create a new SessionCookieJar object

File

vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php, line 25

Class

CookieJar
Cookie jar that stores cookies as an array

Namespace

GuzzleHttp\Cookie

Code

public function __construct($strictMode = false, $cookieArray = []) {
  $this->strictMode = $strictMode;
  foreach ($cookieArray as $cookie) {
    if (!$cookie instanceof SetCookie) {
      $cookie = new SetCookie($cookie);
    }
    $this
      ->setCookie($cookie);
  }
}