1 | <?php |
||
32 | class ServletRequestWrapper implements ServletRequestInterface |
||
33 | { |
||
34 | |||
35 | /** |
||
36 | * The servlet request instance. |
||
37 | * |
||
38 | * @var \AppserverIo\Psr\Servlet\ServletRequestInterface |
||
39 | */ |
||
40 | protected $request; |
||
41 | |||
42 | /** |
||
43 | * Injects the passed request instance into this servlet request. |
||
44 | * |
||
45 | * @param \AppserverIo\Psr\Servlet\ServletRequestInterface $request The request instance used for initialization |
||
46 | * |
||
47 | * @return void |
||
48 | */ |
||
49 | 2 | public function injectRequest(ServletRequestInterface $request) |
|
53 | |||
54 | /** |
||
55 | * Sets the passed request instance into this servlet request. |
||
56 | * |
||
57 | * @param \AppserverIo\Psr\Servlet\ServletRequestInterface $request The request instance used for initialization |
||
58 | * |
||
59 | * @return void |
||
60 | */ |
||
61 | public function setRequest(ServletRequestInterface $request) |
||
65 | |||
66 | /** |
||
67 | * Returns the wrapped request object. |
||
68 | * |
||
69 | * @return \AppserverIo\Psr\Servlet\ServletRequestInterface The wrapped request object |
||
70 | */ |
||
71 | 1 | public function getRequest() |
|
75 | |||
76 | /** |
||
77 | * Returns an array with all request parameters. |
||
78 | * |
||
79 | * @return array The array with the request parameters |
||
80 | */ |
||
81 | public function getParameterMap() |
||
85 | |||
86 | /** |
||
87 | * Return request content. |
||
88 | * |
||
89 | * @return resource The request content |
||
90 | */ |
||
91 | public function getBodyStream() |
||
95 | |||
96 | /** |
||
97 | * Resets the stream resource pointing to body content. |
||
98 | * |
||
99 | * @param resource $bodyStream The body content stream resource |
||
100 | * |
||
101 | * @return void |
||
102 | */ |
||
103 | public function setBodyStream($bodyStream) |
||
107 | |||
108 | /** |
||
109 | * Returns protocol version |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | 1 | public function getVersion() |
|
117 | |||
118 | /** |
||
119 | * Returns the parameter with the passed name if available or null |
||
120 | * if the parameter not exists. |
||
121 | * |
||
122 | * @param string $name The name of the parameter to return |
||
123 | * @param integer $filter The filter to use |
||
124 | * |
||
125 | * @return string|null |
||
126 | */ |
||
127 | public function getParameter($name, $filter = FILTER_SANITIZE_STRING) |
||
131 | |||
132 | /** |
||
133 | * Returns a part object by given name |
||
134 | * |
||
135 | * @param string $name The name of the form part |
||
136 | * |
||
137 | * @return \AppserverIo\Psr\HttpMessage\PartInterface |
||
138 | */ |
||
139 | public function getPart($name) |
||
143 | |||
144 | /** |
||
145 | * Returns the parts collection as array |
||
146 | * |
||
147 | * @return array A collection of HttpPart objects |
||
148 | */ |
||
149 | public function getParts() |
||
153 | |||
154 | /** |
||
155 | * Sets the flag to mark the request dispatched. |
||
156 | * |
||
157 | * @param boolean $dispatched TRUE if the request has already been dispatched, else FALSE |
||
158 | * |
||
159 | * @return void |
||
160 | */ |
||
161 | public function setDispatched($dispatched = true) |
||
165 | |||
166 | /** |
||
167 | * Sets the flag that shows if the request has already been dispatched. |
||
168 | * |
||
169 | * @return boolean TRUE if the request has already been dispatched, else FALSE |
||
170 | */ |
||
171 | public function isDispatched() |
||
175 | |||
176 | /** |
||
177 | * Returns the absolute path info started from the context path. |
||
178 | * |
||
179 | * @return string The absolute path |
||
180 | */ |
||
181 | public function getPathInfo() |
||
185 | |||
186 | /** |
||
187 | * Returns the path to the servlet used to handle this request. |
||
188 | * |
||
189 | * @return string The path to the servlet |
||
190 | */ |
||
191 | public function getServletPath() |
||
195 | } |
||
196 |