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 | 10 | ||
54 | /** |
||
55 | 10 | * @var string |
|
56 | 10 | */ |
|
57 | 10 | private $requestScheme; |
|
58 | |||
59 | /** |
||
60 | * @var string |
||
61 | */ |
||
62 | 1 | private $clientRequest; |
|
63 | |||
64 | 1 | /** |
|
65 | * @var string |
||
66 | */ |
||
67 | private $clientResponse; |
||
68 | |||
69 | /** |
||
70 | 4 | * @var string |
|
71 | */ |
||
72 | 4 | private $clientException; |
|
73 | 4 | ||
74 | /** |
||
75 | * @var int |
||
76 | */ |
||
77 | private $responseCode; |
||
78 | 2 | ||
79 | /** |
||
80 | 2 | * @param string $client |
|
81 | * @param string $request |
||
82 | */ |
||
83 | public function __construct($client, $request) |
||
88 | 1 | ||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getClient() |
||
96 | 1 | ||
97 | /** |
||
98 | * @param Profile $profile |
||
99 | */ |
||
100 | public function addProfile(Profile $profile) |
||
104 | 2 | ||
105 | 2 | /** |
|
106 | * @return Profile[] |
||
107 | */ |
||
108 | public function getProfiles() |
||
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | public function getRequest() |
||
120 | 1 | ||
121 | 1 | /** |
|
122 | * @return string |
||
123 | */ |
||
124 | public function getResponse() |
||
128 | 2 | ||
129 | /** |
||
130 | * @param string $response |
||
131 | */ |
||
132 | public function setResponse($response) |
||
136 | 3 | ||
137 | 3 | /** |
|
138 | * @return bool |
||
139 | */ |
||
140 | public function isFailed() |
||
144 | 2 | ||
145 | /** |
||
146 | * @param bool $failed |
||
147 | */ |
||
148 | public function setFailed($failed) |
||
152 | 3 | ||
153 | 3 | /** |
|
154 | * @return string |
||
155 | */ |
||
156 | public function getRequestTarget() |
||
160 | |||
161 | /** |
||
162 | * @param string $requestTarget |
||
163 | */ |
||
164 | public function setRequestTarget($requestTarget) |
||
168 | |||
169 | /** |
||
170 | * @return string |
||
171 | */ |
||
172 | public function getRequestMethod() |
||
176 | |||
177 | /** |
||
178 | * @param string $requestMethod |
||
179 | */ |
||
180 | public function setRequestMethod($requestMethod) |
||
184 | |||
185 | /** |
||
186 | * @return string |
||
187 | */ |
||
188 | public function getClientRequest() |
||
192 | |||
193 | /** |
||
194 | * @param string $clientRequest |
||
195 | */ |
||
196 | public function setClientRequest($clientRequest) |
||
200 | |||
201 | /** |
||
202 | * @return mixed |
||
203 | */ |
||
204 | public function getClientResponse() |
||
208 | |||
209 | /** |
||
210 | * @param mixed $clientResponse |
||
211 | */ |
||
212 | public function setClientResponse($clientResponse) |
||
216 | |||
217 | /** |
||
218 | * @return string |
||
219 | */ |
||
220 | public function getClientException() |
||
224 | |||
225 | /** |
||
226 | * @param string $clientException |
||
227 | */ |
||
228 | public function setClientException($clientException) |
||
232 | |||
233 | /** |
||
234 | * @return int |
||
235 | */ |
||
236 | public function getResponseCode() |
||
240 | |||
241 | /** |
||
242 | * @param int $responseCode |
||
243 | */ |
||
244 | public function setResponseCode($responseCode) |
||
248 | |||
249 | /** |
||
250 | * @return string |
||
251 | */ |
||
252 | public function getRequestHost() |
||
256 | |||
257 | /** |
||
258 | * @param string $requestHost |
||
259 | */ |
||
260 | public function setRequestHost($requestHost) |
||
264 | |||
265 | /** |
||
266 | * @return string |
||
267 | */ |
||
268 | public function getRequestScheme() |
||
272 | |||
273 | /** |
||
274 | * @param string $requestScheme |
||
275 | */ |
||
276 | public function setRequestScheme($requestScheme) |
||
280 | } |
||
281 |