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