Cookie jar that stores cookies as an array

CloneableInstantiableIterable
ImplementsCountable
GuzzleHttp\Cookie\CookieJarInterface
IteratorAggregate
Traversable
Methods
public __construct( $strictMode = false, $cookieArray = [])
 
    public clear( $domain = NULL, $path = NULL, $name = NULL)
    public clearSessionCookies()
    public count()
    public extractCookies(Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response)
    public static fromArray(array $cookies, $domain)
     

    Create a new Cookie jar from an associative array and domain.

    • return self
    public getCookieByName( $name)
     

    Finds and returns the cookie based on the name

    • return SetCookie|null cookie that was found or null if not found
    public static getCookieValue( $value)
     
    • deprecated
    public getIterator()
    public setCookie(GuzzleHttp\Cookie\SetCookie $cookie)
    public static shouldPersist(GuzzleHttp\Cookie\SetCookie $cookie, $allowSessionCookies = false)
     

    Evaluate if this cookie should be persisted to storage
    that survives between requests.

    • return bool
    public toArray()
    public withCookieHeader(Psr\Http\Message\RequestInterface $request)
    Properties
    private $cookies
     
    • var SetCookie[] Loaded cookie data
    private $strictMode
     
    • var bool
    Methods
    private getCookiePathFromRequest(Psr\Http\Message\RequestInterface $request)
     

    Computes cookie path following RFC 6265 section 5.1.4

    private removeCookieIfEmpty(GuzzleHttp\Cookie\SetCookie $cookie)
     

    If a cookie already exists and the server asks to set it again with a
    null value, the cookie must be deleted.

      Methods
      public static fromArray(array $cookies, $domain)
       

      Create a new Cookie jar from an associative array and domain.

      • return self
      public static getCookieValue( $value)
       
      • deprecated
      public static shouldPersist(GuzzleHttp\Cookie\SetCookie $cookie, $allowSessionCookies = false)
       

      Evaluate if this cookie should be persisted to storage
      that survives between requests.

      • return bool
      © 2020 Bruce Wells
      Search Namespaces \ Classes
      ConfigurationNumbers (0-9.) only