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() |
||
106 | |||
107 | /** |
||
108 | * Set the data array |
||
109 | * @param array $data array of data |
||
110 | */ |
||
111 | public function setData($data) |
||
115 | |||
116 | /** |
||
117 | * Get the data array |
||
118 | * @return array |
||
119 | */ |
||
120 | public function getData() |
||
124 | |||
125 | public function __get($name) |
||
129 | |||
130 | public function __set($name, $value) |
||
134 | } |
||
135 |