PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.1
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.1
28.6 28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 All 130 releases
wordpress-seo / vendor_prefixed / guzzlehttp / guzzle / src / Cookie / CookieJarInterface.php

CookieJarInterface.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.1, at vendor_prefixed/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php

75 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace YoastSEO_Vendor\GuzzleHttp\Cookie;
4
5 use YoastSEO_Vendor\Psr\Http\Message\RequestInterface;
6 use YoastSEO_Vendor\Psr\Http\Message\ResponseInterface;
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 * @see https://docs.python.org/2/library/cookielib.html Inspiration
16 *
17 * @extends \IteratorAggregate<SetCookie>
18 */
19 interface CookieJarInterface extends \Countable, \IteratorAggregate
20 {
21 /**
22 * Create a request with added cookie headers.
23 *
24 * If no matching cookies are found in the cookie jar, then no Cookie
25 * header is added to the request and the same request is returned.
26 *
27 * @param RequestInterface $request Request object to modify.
28 *
29 * @return RequestInterface returns the modified request.
30 */
31 public function withCookieHeader(\YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request) : \YoastSEO_Vendor\Psr\Http\Message\RequestInterface;
32 /**
33 * Extract cookies from an HTTP response and store them in the CookieJar.
34 *
35 * @param RequestInterface $request Request that was sent
36 * @param ResponseInterface $response Response that was received
37 */
38 public function extractCookies(\YoastSEO_Vendor\Psr\Http\Message\RequestInterface $request, \YoastSEO_Vendor\Psr\Http\Message\ResponseInterface $response) : void;
39 /**
40 * Sets a cookie in the cookie jar.
41 *
42 * @param SetCookie $cookie Cookie to set.
43 *
44 * @return bool Returns true on success or false on failure
45 */
46 public function setCookie(\YoastSEO_Vendor\GuzzleHttp\Cookie\SetCookie $cookie) : bool;
47 /**
48 * Remove cookies currently held in the cookie jar.
49 *
50 * Invoking this method without arguments will empty the whole cookie jar.
51 * If given a $domain argument only cookies belonging to that domain will
52 * be removed. If given a $domain and $path argument, cookies belonging to
53 * the specified path within that domain are removed. If given all three
54 * arguments, then the cookie with the specified name, path and domain is
55 * removed.
56 *
57 * @param string|null $domain Clears cookies matching a domain
58 * @param string|null $path Clears cookies matching a domain and path
59 * @param string|null $name Clears cookies matching a domain, path, and name
60 */
61 public function clear(?string $domain = null, ?string $path = null, ?string $name = null) : void;
62 /**
63 * Discard all sessions cookies.
64 *
65 * Removes cookies that don't have an expire field or a have a discard
66 * field set to true. To be called when the user agent shuts down according
67 * to RFC 2965.
68 */
69 public function clearSessionCookies() : void;
70 /**
71 * Converts the cookie jar to an array.
72 */
73 public function toArray() : array;
74 }
75