2020 */
2121interface RequestInterface extends MessageInterface
2222{
23+ /**
24+ * Extends MessageInterface::getHeaders() to provide request-specific
25+ * behavior.
26+ *
27+ * Retrieves all message headers.
28+ *
29+ * This method acts exactly like MessageInterface::getHeaders(), with one
30+ * behavioral change: if the Host header has not been previously set, the
31+ * method MUST attempt to pull the host segment of the composed URI, if
32+ * present.
33+ *
34+ * @see MessageInterface::getHeaders()
35+ * @see UriInterface::getHost()
36+ * @return array Returns an associative array of the message's headers. Each
37+ * key MUST be a header name, and each value MUST be an array of strings.
38+ */
39+ public function getHeaders ();
40+
2341 /**
2442 * Extends MessageInterface::getHeader() to provide request-specific
2543 * behavior.
2644 *
2745 * This method acts exactly like MessageInterface::getHeader(), with
2846 * one behavioral change: if the Host header is requested, but has
29- * not been previously set, the method SHOULD attempt to pull the host
47+ * not been previously set, the method MUST attempt to pull the host
3048 * segment of the composed URI, if present.
3149 *
3250 * @see MessageInterface::getHeader()
@@ -36,6 +54,24 @@ interface RequestInterface extends MessageInterface
3654 */
3755 public function getHeader ($ name );
3856
57+ /**
58+ * Extends MessageInterface::getHeaderLines() to provide request-specific
59+ * behavior.
60+ *
61+ * Retrieves a header by the given case-insensitive name as an array of strings.
62+ *
63+ * This method acts exactly like MessageInterface::getHeaderLines(), with
64+ * one behavioral change: if the Host header is requested, but has
65+ * not been previously set, the method MUST attempt to pull the host
66+ * segment of the composed URI, if present.
67+ *
68+ * @see MessageInterface::getHeaderLines()
69+ * @see UriInterface::getHost()
70+ * @param string $name Case-insensitive header field name.
71+ * @return string[]
72+ */
73+ public function getHeaderLines ($ name );
74+
3975 /**
4076 * Retrieves the message's request target.
4177 *
0 commit comments