1 | <?php |
||
12 | final class Stack |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | private $client; |
||
18 | |||
19 | /** |
||
20 | * @var Profile[] |
||
21 | */ |
||
22 | private $profiles = []; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private $request; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | private $response; |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | private $failed = false; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | private $requestTarget; |
||
43 | |||
44 | /** |
||
45 | * @var string |
||
46 | */ |
||
47 | private $requestMethod; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | private $requestHost; |
||
53 | |||
54 | /** |
||
55 | * @var string |
||
56 | */ |
||
57 | private $requestScheme; |
||
58 | |||
59 | /** |
||
60 | * @var string |
||
61 | */ |
||
62 | private $clientRequest; |
||
63 | |||
64 | /** |
||
65 | * @var string |
||
66 | */ |
||
67 | private $clientResponse; |
||
68 | |||
69 | /** |
||
70 | * @var string |
||
71 | */ |
||
72 | private $clientException; |
||
73 | |||
74 | /** |
||
75 | * @var int |
||
76 | */ |
||
77 | private $responseCode; |
||
78 | |||
79 | /** |
||
80 | * @var int |
||
81 | */ |
||
82 | private $duration = 0; |
||
83 | |||
84 | /** |
||
85 | * @param string $client |
||
86 | * @param string $request |
||
87 | */ |
||
88 | 10 | public function __construct($client, $request) |
|
93 | |||
94 | /** |
||
95 | * @return string |
||
96 | */ |
||
97 | 1 | public function getClient() |
|
101 | |||
102 | /** |
||
103 | * @param Profile $profile |
||
104 | */ |
||
105 | 4 | public function addProfile(Profile $profile) |
|
109 | |||
110 | /** |
||
111 | * @return Profile[] |
||
112 | */ |
||
113 | 2 | public function getProfiles() |
|
117 | |||
118 | /** |
||
119 | * @return string |
||
120 | */ |
||
121 | 1 | public function getRequest() |
|
125 | |||
126 | /** |
||
127 | * @return string |
||
128 | */ |
||
129 | 1 | public function getResponse() |
|
133 | |||
134 | /** |
||
135 | * @param string $response |
||
136 | */ |
||
137 | 2 | public function setResponse($response) |
|
141 | |||
142 | /** |
||
143 | * @return bool |
||
144 | */ |
||
145 | public function isFailed() |
||
149 | |||
150 | /** |
||
151 | * @param bool $failed |
||
152 | */ |
||
153 | 1 | public function setFailed($failed) |
|
157 | |||
158 | /** |
||
159 | * @return string |
||
160 | */ |
||
161 | 2 | public function getRequestTarget() |
|
165 | |||
166 | /** |
||
167 | * @param string $requestTarget |
||
168 | */ |
||
169 | 3 | public function setRequestTarget($requestTarget) |
|
173 | |||
174 | /** |
||
175 | * @return string |
||
176 | */ |
||
177 | 2 | public function getRequestMethod() |
|
181 | |||
182 | /** |
||
183 | * @param string $requestMethod |
||
184 | */ |
||
185 | 3 | public function setRequestMethod($requestMethod) |
|
189 | |||
190 | /** |
||
191 | * @return string |
||
192 | */ |
||
193 | public function getClientRequest() |
||
197 | |||
198 | /** |
||
199 | * @param string $clientRequest |
||
200 | */ |
||
201 | 3 | public function setClientRequest($clientRequest) |
|
205 | |||
206 | /** |
||
207 | * @return mixed |
||
208 | */ |
||
209 | public function getClientResponse() |
||
213 | |||
214 | /** |
||
215 | * @param mixed $clientResponse |
||
216 | */ |
||
217 | 2 | public function setClientResponse($clientResponse) |
|
221 | |||
222 | /** |
||
223 | * @return string |
||
224 | */ |
||
225 | public function getClientException() |
||
229 | |||
230 | /** |
||
231 | * @param string $clientException |
||
232 | */ |
||
233 | public function setClientException($clientException) |
||
237 | |||
238 | /** |
||
239 | * @return int |
||
240 | */ |
||
241 | public function getResponseCode() |
||
245 | |||
246 | /** |
||
247 | * @param int $responseCode |
||
248 | */ |
||
249 | 2 | public function setResponseCode($responseCode) |
|
253 | |||
254 | /** |
||
255 | * @return string |
||
256 | */ |
||
257 | 2 | public function getRequestHost() |
|
261 | |||
262 | /** |
||
263 | * @param string $requestHost |
||
264 | */ |
||
265 | 3 | public function setRequestHost($requestHost) |
|
269 | |||
270 | /** |
||
271 | * @return string |
||
272 | */ |
||
273 | 2 | public function getRequestScheme() |
|
277 | |||
278 | /** |
||
279 | * @param string $requestScheme |
||
280 | */ |
||
281 | 3 | public function setRequestScheme($requestScheme) |
|
285 | |||
286 | /** |
||
287 | * @return int |
||
288 | */ |
||
289 | public function getDuration() |
||
293 | |||
294 | /** |
||
295 | * @param int $duration |
||
296 | */ |
||
297 | 2 | public function setDuration($duration) |
|
301 | } |
||
302 |