[ Index ]

PHP Cross Reference of phpBB-3.2.8-deutsch

title

Body

[close]

/vendor/guzzlehttp/guzzle/src/Cookie/ -> CookieJarInterface.php (source)

   1  <?php
   2  namespace GuzzleHttp\Cookie;
   3  
   4  use GuzzleHttp\Message\RequestInterface;
   5  use GuzzleHttp\Message\ResponseInterface;
   6  
   7  /**
   8   * Stores HTTP cookies.
   9   *
  10   * It extracts cookies from HTTP requests, and returns them in HTTP responses.
  11   * CookieJarInterface instances automatically expire contained cookies when
  12   * necessary. Subclasses are also responsible for storing and retrieving
  13   * cookies from a file, database, etc.
  14   *
  15   * @link http://docs.python.org/2/library/cookielib.html Inspiration
  16   */
  17  interface CookieJarInterface extends \Countable, \IteratorAggregate
  18  {
  19      /**
  20       * Add a Cookie header to a request.
  21       *
  22       * If no matching cookies are found in the cookie jar, then no Cookie
  23       * header is added to the request.
  24       *
  25       * @param RequestInterface $request Request object to update
  26       */
  27      public function addCookieHeader(RequestInterface $request);
  28  
  29      /**
  30       * Extract cookies from an HTTP response and store them in the CookieJar.
  31       *
  32       * @param RequestInterface  $request  Request that was sent
  33       * @param ResponseInterface $response Response that was received
  34       */
  35      public function extractCookies(
  36          RequestInterface $request,
  37          ResponseInterface $response
  38      );
  39  
  40      /**
  41       * Sets a cookie in the cookie jar.
  42       *
  43       * @param SetCookie $cookie Cookie to set.
  44       *
  45       * @return bool Returns true on success or false on failure
  46       */
  47      public function setCookie(SetCookie $cookie);
  48  
  49      /**
  50       * Remove cookies currently held in the cookie jar.
  51       *
  52       * Invoking this method without arguments will empty the whole cookie jar.
  53       * If given a $domain argument only cookies belonging to that domain will
  54       * be removed. If given a $domain and $path argument, cookies belonging to
  55       * the specified path within that domain are removed. If given all three
  56       * arguments, then the cookie with the specified name, path and domain is
  57       * removed.
  58       *
  59       * @param string $domain Clears cookies matching a domain
  60       * @param string $path   Clears cookies matching a domain and path
  61       * @param string $name   Clears cookies matching a domain, path, and name
  62       *
  63       * @return CookieJarInterface
  64       */
  65      public function clear($domain = null, $path = null, $name = null);
  66  
  67      /**
  68       * Discard all sessions cookies.
  69       *
  70       * Removes cookies that don't have an expire field or a have a discard
  71       * field set to true. To be called when the user agent shuts down according
  72       * to RFC 2965.
  73       */
  74      public function clearSessionCookies();
  75  }


Generated: Tue Apr 7 19:42:26 2020 Cross-referenced by PHPXref 0.7.1