1 | <?php |
||
7 | class Request extends Message implements RequestInterface |
||
8 | { |
||
9 | /** |
||
10 | * @var |
||
11 | */ |
||
12 | protected $method; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $requestTarget; |
||
18 | |||
19 | /** |
||
20 | * @var Uri |
||
21 | */ |
||
22 | protected $uri; |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | * |
||
27 | * @return string |
||
28 | */ |
||
29 | 4 | public function getRequestTarget() |
|
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | * |
||
50 | * @link http://tools.ietf.org/html/rfc3986#section-4.3 |
||
51 | * @return UriInterface Returns a UriInterface instance |
||
52 | * representing the URI of the request. |
||
53 | */ |
||
54 | 16 | public function getUri() |
|
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | * |
||
62 | * @link http://tools.ietf.org/html/rfc7230#section-2.7 (for the various |
||
63 | * request-target forms allowed in request messages) |
||
64 | * @param mixed $requestTarget |
||
65 | * @return self |
||
66 | */ |
||
67 | 17 | public function withRequestTarget($requestTarget) |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | * |
||
75 | * @return string Returns the request method. |
||
76 | */ |
||
77 | 7 | public function getMethod() |
|
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | * |
||
85 | * @param string $method Case-sensitive method. |
||
86 | * @return self |
||
87 | * @throws \InvalidArgumentException for invalid HTTP methods. |
||
88 | */ |
||
89 | 23 | public function withMethod($method) |
|
101 | |||
102 | /** |
||
103 | * {@inheritdoc} |
||
104 | * |
||
105 | * @link http://tools.ietf.org/html/rfc3986#section-4.3 |
||
106 | * @param UriInterface $uri New request URI to use. |
||
107 | * @param bool $preserveHost Preserve the original state of the Host header. |
||
108 | * @return self |
||
109 | */ |
||
110 | 4 | public function withUri(UriInterface $uri, $preserveHost = false) |
|
124 | } |
||
125 |