PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 2.15.0
Independent Analytics – WordPress Analytics Plugin v2.15.0
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 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
MessageInterface.php
180 lines
1 <?php
2
3 declare (strict_types=1);
4 namespace IAWPSCOPED\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 * @internal
18 */
19 interface MessageInterface
20 {
21 /**
22 * Retrieves the HTTP protocol version as a string.
23 *
24 * The string MUST contain only the HTTP version number (e.g., "1.1", "1.0").
25 *
26 * @return string HTTP protocol version.
27 */
28 public function getProtocolVersion();
29 /**
30 * Return an instance with the specified HTTP protocol version.
31 *
32 * The version string MUST contain only the HTTP version number (e.g.,
33 * "1.1", "1.0").
34 *
35 * This method MUST be implemented in such a way as to retain the
36 * immutability of the message, and MUST return an instance that has the
37 * new protocol version.
38 *
39 * @param string $version HTTP protocol version
40 * @return static
41 */
42 public function withProtocolVersion(string $version);
43 /**
44 * Retrieves all message header values.
45 *
46 * The keys represent the header name as it will be sent over the wire, and
47 * each value is an array of strings associated with the header.
48 *
49 * // Represent the headers as a string
50 * foreach ($message->getHeaders() as $name => $values) {
51 * echo $name . ": " . implode(", ", $values);
52 * }
53 *
54 * // Emit headers iteratively:
55 * foreach ($message->getHeaders() as $name => $values) {
56 * foreach ($values as $value) {
57 * header(sprintf('%s: %s', $name, $value), false);
58 * }
59 * }
60 *
61 * While header names are not case-sensitive, getHeaders() will preserve the
62 * exact case in which headers were originally specified.
63 *
64 * @return string[][] Returns an associative array of the message's headers. Each
65 * key MUST be a header name, and each value MUST be an array of strings
66 * for that header.
67 */
68 public function getHeaders();
69 /**
70 * Checks if a header exists by the given case-insensitive name.
71 *
72 * @param string $name Case-insensitive header field name.
73 * @return bool Returns true if any header names match the given header
74 * name using a case-insensitive string comparison. Returns false if
75 * no matching header name is found in the message.
76 */
77 public function hasHeader(string $name);
78 /**
79 * Retrieves a message header value by the given case-insensitive name.
80 *
81 * This method returns an array of all the header values of the given
82 * case-insensitive header name.
83 *
84 * If the header does not appear in the message, this method MUST return an
85 * empty array.
86 *
87 * @param string $name Case-insensitive header field name.
88 * @return string[] An array of string values as provided for the given
89 * header. If the header does not appear in the message, this method MUST
90 * return an empty array.
91 */
92 public function getHeader(string $name);
93 /**
94 * Retrieves a comma-separated string of the values for a single header.
95 *
96 * This method returns all of the header values of the given
97 * case-insensitive header name as a string concatenated together using
98 * a comma.
99 *
100 * NOTE: Not all header values may be appropriately represented using
101 * comma concatenation. For such headers, use getHeader() instead
102 * and supply your own delimiter when concatenating.
103 *
104 * If the header does not appear in the message, this method MUST return
105 * an empty string.
106 *
107 * @param string $name Case-insensitive header field name.
108 * @return string A string of values as provided for the given header
109 * concatenated together using a comma. If the header does not appear in
110 * the message, this method MUST return an empty string.
111 */
112 public function getHeaderLine(string $name);
113 /**
114 * Return an instance with the provided value replacing the specified header.
115 *
116 * While header names are case-insensitive, the casing of the header will
117 * be preserved by this function, and returned from getHeaders().
118 *
119 * This method MUST be implemented in such a way as to retain the
120 * immutability of the message, and MUST return an instance that has the
121 * new and/or updated header and value.
122 *
123 * @param string $name Case-insensitive header field name.
124 * @param string|string[] $value Header value(s).
125 * @return static
126 * @throws \InvalidArgumentException for invalid header names or values.
127 */
128 public function withHeader(string $name, $value);
129 /**
130 * Return an instance with the specified header appended with the given value.
131 *
132 * Existing values for the specified header will be maintained. The new
133 * value(s) will be appended to the existing list. If the header did not
134 * exist previously, it will be added.
135 *
136 * This method MUST be implemented in such a way as to retain the
137 * immutability of the message, and MUST return an instance that has the
138 * new header and/or value.
139 *
140 * @param string $name Case-insensitive header field name to add.
141 * @param string|string[] $value Header value(s).
142 * @return static
143 * @throws \InvalidArgumentException for invalid header names or values.
144 */
145 public function withAddedHeader(string $name, $value);
146 /**
147 * Return an instance without the specified header.
148 *
149 * Header resolution MUST be done without case-sensitivity.
150 *
151 * This method MUST be implemented in such a way as to retain the
152 * immutability of the message, and MUST return an instance that removes
153 * the named header.
154 *
155 * @param string $name Case-insensitive header field name to remove.
156 * @return static
157 */
158 public function withoutHeader(string $name);
159 /**
160 * Gets the body of the message.
161 *
162 * @return StreamInterface Returns the body as a stream.
163 */
164 public function getBody();
165 /**
166 * Return an instance with the specified message body.
167 *
168 * The body MUST be a StreamInterface object.
169 *
170 * This method MUST be implemented in such a way as to retain the
171 * immutability of the message, and MUST return a new instance that has the
172 * new body stream.
173 *
174 * @param StreamInterface $body Body.
175 * @return static
176 * @throws \InvalidArgumentException When the body is not valid.
177 */
178 public function withBody(StreamInterface $body);
179 }
180