Total Complexity | 5 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class HTTPRequestException extends IssueLinksException |
||
13 | { |
||
14 | protected $httpError; |
||
15 | protected $responseBody; |
||
16 | protected $url; |
||
17 | protected $method; |
||
18 | |||
19 | public function __construct($message, \DokuHTTPClient $httpClient, $url, $method) |
||
20 | { |
||
21 | $this->code = $httpClient->status; |
||
22 | $this->httpError = $httpClient->error; |
||
23 | $this->responseBody = $httpClient->resp_body; |
||
24 | $this->url = $url; |
||
25 | $this->method = $method; |
||
26 | |||
27 | parent::__construct($message, $this->getCode(), $this->httpError); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return string |
||
32 | */ |
||
33 | public function getHttpError() |
||
34 | { |
||
35 | return $this->httpError; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getResponseBody() |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getUrl() |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getMethod() |
||
60 | } |
||
61 | } |
||
62 |