Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
1 / 1 |
HttpClientResponse | |
100.00% |
2 / 2 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
disposeImpl | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace PeServer\Core\Http\Client; |
6 | |
7 | use CurlHandle; |
8 | use PeServer\Core\Binary; |
9 | use PeServer\Core\DisposerBase; |
10 | use PeServer\Core\Http\Client\HttpClientOptions; |
11 | use PeServer\Core\Http\Client\HttpClientRequest; |
12 | use PeServer\Core\Http\Client\HttpClientStatus; |
13 | use PeServer\Core\Http\HttpHeader; |
14 | use PeServer\Core\Throws\HttpClientException; |
15 | |
16 | /** */ |
17 | class HttpClientResponse extends DisposerBase |
18 | { |
19 | /** |
20 | * 生成。 |
21 | * |
22 | * @param HttpClientOptions $options |
23 | * @param HttpClientRequest $request |
24 | * @param CurlHandle $curlHandle |
25 | * @param HttpHeader $header |
26 | * @param Binary $content |
27 | * @param HttpClientInformation $information |
28 | * @param HttpClientStatus $clientStatus |
29 | */ |
30 | public function __construct( |
31 | readonly public HttpClientOptions $options, |
32 | readonly public HttpClientRequest $request, |
33 | private CurlHandle $curlHandle, |
34 | readonly public HttpHeader $header, |
35 | readonly public Binary $content, |
36 | readonly public HttpClientInformation $information, |
37 | readonly public HttpClientStatus $clientStatus |
38 | ) { |
39 | } |
40 | |
41 | #region function |
42 | |
43 | |
44 | #endregion |
45 | |
46 | #region DisposerBase |
47 | |
48 | protected function disposeImpl(): void |
49 | { |
50 | curl_close($this->curlHandle); |
51 | } |
52 | |
53 | #endregion |
54 | } |