PluginProbe ʕ •ᴥ•ʔ
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments / 4.5.0
SureCart – Ecommerce Made Easy For Selling Physical Products, Digital Downloads, Subscriptions, Donations, & Payments v4.5.0
4.5.1 4.5.0 4.4.2 4.4.1 4.4.0 4.3.3 4.3.2 4.3.1 4.3.0 4.2.3 4.2.2 4.2.1 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.10 1.1.11 1.1.12 1.1.13 1.1.14 1.1.15 1.1.16 1.1.17 1.1.18 1.1.19 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.11.0 1.11.1 1.11.2 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.9.0 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 2.0.0 2.0.1 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.12.0 2.13.0 2.14.0 2.14.1 2.15.0 2.15.1 2.16.0 2.16.1 2.16.2 2.16.3 2.17.0 2.17.1 2.17.2 2.18.0 2.19.0 2.19.2 2.19.3 2.19.4 2.2.0 2.2.1 2.20.0 2.20.1 2.20.2 2.20.3 2.20.4 2.20.5 2.20.6 2.21.0 2.22.0 2.22.1 2.23.0 2.24.0 2.25.0 2.25.1 2.25.2 2.26.0 2.27.0 2.27.1 2.28.0 2.29.0 2.29.1 2.29.2 2.29.3 2.29.4 2.3.0 2.3.1 2.30.0 2.31.0 2.31.1 2.31.2 2.31.3 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.40.0 2.40.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.9.0 3.0.0 3.0.0-RC1 3.0.0-RC2 3.0.0-beta1 3.0.0-beta2 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.10.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.1 3.13.2 3.13.3 3.13.4 3.14.0 3.15.0 3.15.1 3.15.2 3.15.3 3.15.4 3.15.5 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.16.6 3.16.7 3.16.8 3.17.0 3.17.1 3.17.2 3.17.3 3.17.4 3.17.5 3.17.6 3.18.0 3.19.0 3.19.1 3.19.2 3.2.0 3.2.1 3.2.2 3.20.0 3.20.1 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.4.3 3.5.0 3.5.1 3.5.2 3.5.3 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.7.3 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 trunk 4.1.0 0.2.19.1 4.1.1 1.0.0 4.2.0 1.0.1 1.0.2
surecart / vendor / psr / http-message / src / RequestInterface.php
surecart / vendor / psr / http-message / src Last commit date
MessageInterface.php 2 years ago RequestInterface.php 2 years ago ResponseInterface.php 2 years ago ServerRequestInterface.php 2 years ago StreamInterface.php 2 years ago UploadedFileInterface.php 2 years ago UriInterface.php 2 years ago
RequestInterface.php
132 lines
1 <?php
2
3 declare(strict_types=1);
4
5 namespace SureCartVendors\Psr\Http\Message;
6
7 /**
8 * Representation of an outgoing, client-side request.
9 *
10 * Per the HTTP specification, this interface includes properties for
11 * each of the following:
12 *
13 * - Protocol version
14 * - HTTP method
15 * - URI
16 * - Headers
17 * - Message body
18 *
19 * During construction, implementations MUST attempt to set the Host header from
20 * a provided URI if no Host header is provided.
21 *
22 * Requests are considered immutable; all methods that might change state MUST
23 * be implemented such that they retain the internal state of the current
24 * message and return an instance that contains the changed state.
25 */
26 interface RequestInterface extends MessageInterface
27 {
28 /**
29 * Retrieves the message's request target.
30 *
31 * Retrieves the message's request-target either as it will appear (for
32 * clients), as it appeared at request (for servers), or as it was
33 * specified for the instance (see withRequestTarget()).
34 *
35 * In most cases, this will be the origin-form of the composed URI,
36 * unless a value was provided to the concrete implementation (see
37 * withRequestTarget() below).
38 *
39 * If no URI is available, and no request-target has been specifically
40 * provided, this method MUST return the string "/".
41 *
42 * @return string
43 */
44 public function getRequestTarget();
45
46 /**
47 * Return an instance with the specific request-target.
48 *
49 * If the request needs a non-origin-form request-target — e.g., for
50 * specifying an absolute-form, authority-form, or asterisk-form —
51 * this method may be used to create an instance with the specified
52 * request-target, verbatim.
53 *
54 * This method MUST be implemented in such a way as to retain the
55 * immutability of the message, and MUST return an instance that has the
56 * changed request target.
57 *
58 * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
59 * request-target forms allowed in request messages)
60 * @param string $requestTarget
61 * @return static
62 */
63 public function withRequestTarget(string $requestTarget);
64
65 /**
66 * Retrieves the HTTP method of the request.
67 *
68 * @return string Returns the request method.
69 */
70 public function getMethod();
71
72 /**
73 * Return an instance with the provided HTTP method.
74 *
75 * While HTTP method names are typically all uppercase characters, HTTP
76 * method names are case-sensitive and thus implementations SHOULD NOT
77 * modify the given string.
78 *
79 * This method MUST be implemented in such a way as to retain the
80 * immutability of the message, and MUST return an instance that has the
81 * changed request method.
82 *
83 * @param string $method Case-sensitive method.
84 * @return static
85 * @throws \InvalidArgumentException for invalid HTTP methods.
86 */
87 public function withMethod(string $method);
88
89 /**
90 * Retrieves the URI instance.
91 *
92 * This method MUST return a UriInterface instance.
93 *
94 * @link http://tools.ietf.org/html/rfc3986#section-4.3
95 * @return UriInterface Returns a UriInterface instance
96 * representing the URI of the request.
97 */
98 public function getUri();
99
100 /**
101 * Returns an instance with the provided URI.
102 *
103 * This method MUST update the Host header of the returned request by
104 * default if the URI contains a host component. If the URI does not
105 * contain a host component, any pre-existing Host header MUST be carried
106 * over to the returned request.
107 *
108 * You can opt-in to preserving the original state of the Host header by
109 * setting `$preserveHost` to `true`. When `$preserveHost` is set to
110 * `true`, this method interacts with the Host header in the following ways:
111 *
112 * - If the Host header is missing or empty, and the new URI contains
113 * a host component, this method MUST update the Host header in the returned
114 * request.
115 * - If the Host header is missing or empty, and the new URI does not contain a
116 * host component, this method MUST NOT update the Host header in the returned
117 * request.
118 * - If a Host header is present and non-empty, this method MUST NOT update
119 * the Host header in the returned request.
120 *
121 * This method MUST be implemented in such a way as to retain the
122 * immutability of the message, and MUST return an instance that has the
123 * new UriInterface instance.
124 *
125 * @link http://tools.ietf.org/html/rfc3986#section-4.3
126 * @param UriInterface $uri New request URI to use.
127 * @param bool $preserveHost Preserve the original state of the Host header.
128 * @return static
129 */
130 public function withUri(UriInterface $uri, bool $preserveHost = false);
131 }
132