1 | <?php |
||
8 | class Request extends EventEmitter |
||
9 | { |
||
10 | /** @var \React\Http\Request */ |
||
11 | public $httpRequest; |
||
12 | |||
13 | /** @var mixed */ |
||
14 | private $content; |
||
15 | |||
16 | /** @var array */ |
||
17 | private $data = []; |
||
18 | |||
19 | /** |
||
20 | * @param ReactHttpRequest $httpRequest |
||
21 | */ |
||
22 | public function __construct(ReactHttpRequest $httpRequest) |
||
26 | |||
27 | /** |
||
28 | * Set the raw data of the request |
||
29 | * @param mixed $content |
||
30 | */ |
||
31 | public function setContent($content) |
||
35 | |||
36 | /** |
||
37 | * Set the raw data of the request |
||
38 | * @return mixed |
||
39 | */ |
||
40 | public function getContent() |
||
44 | |||
45 | /** |
||
46 | * Get formated headers |
||
47 | * @return array |
||
48 | */ |
||
49 | public function getHeaders() |
||
58 | |||
59 | /** |
||
60 | * Parse request data |
||
61 | * @return void |
||
62 | */ |
||
63 | public function parseData() |
||
87 | |||
88 | private function onEnd($dataResult) |
||
95 | |||
96 | /** |
||
97 | * Parse querystring |
||
98 | * @param string $dataString |
||
99 | * @return void |
||
100 | */ |
||
101 | private function parseStr($dataString) |
||
110 | |||
111 | /** |
||
112 | * Parse json string |
||
113 | * @param string $jsonString |
||
114 | * @return void |
||
115 | */ |
||
116 | private function parseJson($jsonString) |
||
129 | |||
130 | /** |
||
131 | * Check if current request is a json request |
||
132 | * @return boolean |
||
133 | */ |
||
134 | public function isJson() |
||
140 | |||
141 | /** |
||
142 | * Set the data array |
||
143 | * @param array $data array of data |
||
144 | */ |
||
145 | public function setData($data) |
||
149 | |||
150 | /** |
||
151 | * Get the data array |
||
152 | * @return array |
||
153 | */ |
||
154 | public function getData() |
||
158 | |||
159 | public function __get($name) |
||
163 | |||
164 | public function __set($name, $value) |
||
168 | } |
||
169 |
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.