PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.23.0
Independent Analytics – WordPress Analytics Plugin v1.23.0
2.15.5 2.15.4 2.15.3 2.15.2 2.15.1 2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / vendor / psr / http-message / src / MessageInterface.php
independent-analytics / vendor / psr / http-message / src Last commit date
MessageInterface.php 3 years ago RequestInterface.php 3 years ago ResponseInterface.php 3 years ago ServerRequestInterface.php 3 years ago StreamInterface.php 3 years ago UploadedFileInterface.php 3 years ago UriInterface.php 3 years ago
MessageInterface.php
179 lines
1 <?php
2
3 declare (strict_types=1);
4 namespace IAWP_SCOPED\Psr\Http\Message;
5
6 /**
7 * HTTP messages consist of requests from a client to a server and responses
8 * from a server to a client. This interface defines the methods common to
9 * each.
10 *
11 * Messages are considered immutable; all methods that might change state MUST
12 * be implemented such that they retain the internal state of the current
13 * message and return an instance that contains the changed state.
14 *
15 * @link http://www.ietf.org/rfc/rfc7230.txt
16 * @link http://www.ietf.org/rfc/rfc7231.txt
17 */
18 interface MessageInterface
19 {
20 /**
21 * Retrieves the HTTP protocol version as a string.
22 *
23 * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
24 *
25 * @return string HTTP protocol version.
26 */
27 public function getProtocolVersion();
28 /**
29 * Return an instance with the specified HTTP protocol version.
30 *
31 * The version string MUST contain only the HTTP version number (e.g.,
32 * "1.1", "1.0").
33 *
34 * This method MUST be implemented in such a way as to retain the
35 * immutability of the message, and MUST return an instance that has the
36 * new protocol version.
37 *
38 * @param string $version HTTP protocol version
39 * @return static
40 */
41 public function withProtocolVersion(string $version);
42 /**
43 * Retrieves all message header values.
44 *
45 * The keys represent the header name as it will be sent over the wire, and
46 * each value is an array of strings associated with the header.
47 *
48 * // Represent the headers as a string
49 * foreach ($message->getHeaders() as $name => $values) {
50 * echo $name . ": " . implode(", ", $values);
51 * }
52 *
53 * // Emit headers iteratively:
54 * foreach ($message->getHeaders() as $name => $values) {
55 * foreach ($values as $value) {
56 * header(sprintf('%s: %s', $name, $value), false);
57 * }
58 * }
59 *
60 * While header names are not case-sensitive, getHeaders() will preserve the
61 * exact case in which headers were originally specified.
62 *
63 * @return string[][] Returns an associative array of the message's headers. Each
64 * key MUST be a header name, and each value MUST be an array of strings
65 * for that header.
66 */
67 public function getHeaders();
68 /**
69 * Checks if a header exists by the given case-insensitive name.
70 *
71 * @param string $name Case-insensitive header field name.
72 * @return bool Returns true if any header names match the given header
73 * name using a case-insensitive string comparison. Returns false if
74 * no matching header name is found in the message.
75 */
76 public function hasHeader(string $name);
77 /**
78 * Retrieves a message header value by the given case-insensitive name.
79 *
80 * This method returns an array of all the header values of the given
81 * case-insensitive header name.
82 *
83 * If the header does not appear in the message, this method MUST return an
84 * empty array.
85 *
86 * @param string $name Case-insensitive header field name.
87 * @return string[] An array of string values as provided for the given
88 * header. If the header does not appear in the message, this method MUST
89 * return an empty array.
90 */
91 public function getHeader(string $name);
92 /**
93 * Retrieves a comma-separated string of the values for a single header.
94 *
95 * This method returns all of the header values of the given
96 * case-insensitive header name as a string concatenated together using
97 * a comma.
98 *
99 * NOTE: Not all header values may be appropriately represented using
100 * comma concatenation. For such headers, use getHeader() instead
101 * and supply your own delimiter when concatenating.
102 *
103 * If the header does not appear in the message, this method MUST return
104 * an empty string.
105 *
106 * @param string $name Case-insensitive header field name.
107 * @return string A string of values as provided for the given header
108 * concatenated together using a comma. If the header does not appear in
109 * the message, this method MUST return an empty string.
110 */
111 public function getHeaderLine(string $name);
112 /**
113 * Return an instance with the provided value replacing the specified header.
114 *
115 * While header names are case-insensitive, the casing of the header will
116 * be preserved by this function, and returned from getHeaders().
117 *
118 * This method MUST be implemented in such a way as to retain the
119 * immutability of the message, and MUST return an instance that has the
120 * new and/or updated header and value.
121 *
122 * @param string $name Case-insensitive header field name.
123 * @param string|string[] $value Header value(s).
124 * @return static
125 * @throws \InvalidArgumentException for invalid header names or values.
126 */
127 public function withHeader(string $name, $value);
128 /**
129 * Return an instance with the specified header appended with the given value.
130 *
131 * Existing values for the specified header will be maintained. The new
132 * value(s) will be appended to the existing list. If the header did not
133 * exist previously, it will be added.
134 *
135 * This method MUST be implemented in such a way as to retain the
136 * immutability of the message, and MUST return an instance that has the
137 * new header and/or value.
138 *
139 * @param string $name Case-insensitive header field name to add.
140 * @param string|string[] $value Header value(s).
141 * @return static
142 * @throws \InvalidArgumentException for invalid header names or values.
143 */
144 public function withAddedHeader(string $name, $value);
145 /**
146 * Return an instance without the specified header.
147 *
148 * Header resolution MUST be done without case-sensitivity.
149 *
150 * This method MUST be implemented in such a way as to retain the
151 * immutability of the message, and MUST return an instance that removes
152 * the named header.
153 *
154 * @param string $name Case-insensitive header field name to remove.
155 * @return static
156 */
157 public function withoutHeader(string $name);
158 /**
159 * Gets the body of the message.
160 *
161 * @return StreamInterface Returns the body as a stream.
162 */
163 public function getBody();
164 /**
165 * Return an instance with the specified message body.
166 *
167 * The body MUST be a StreamInterface object.
168 *
169 * This method MUST be implemented in such a way as to retain the
170 * immutability of the message, and MUST return a new instance that has the
171 * new body stream.
172 *
173 * @param StreamInterface $body Body.
174 * @return static
175 * @throws \InvalidArgumentException When the body is not valid.
176 */
177 public function withBody(StreamInterface $body);
178 }
179