-
Notifications
You must be signed in to change notification settings - Fork 80
/
HttpTokenResponseException.php
67 lines (60 loc) · 1.44 KB
/
HttpTokenResponseException.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
namespace dokuwiki\plugin\oauth;
use OAuth\Common\Http\Exception\TokenResponseException;
/**
* Exception relating to http token response from service.
*/
class HttpTokenResponseException extends TokenResponseException
{
protected $httpStatusCode = 0;
protected $httpErrorMessage = "";
protected $httpRespBody = "";
/**
* @param string $message
* @param int $httpStatusCode
* @param string httpErrorMessage
* @param mixed httpRespBody
* @param int $code
* @param \Throwable|null $previous
*/
public function __construct(
$message = "",
$httpStatusCode = 0,
$httpErrorMessage = "",
$httpRespBody = "",
$code = 0,
\Throwable $previous = null
) {
parent::__construct($message, $code, $previous);
$this->httpStatusCode = $httpStatusCode;
$this->httpErrorMessage = $httpErrorMessage;
$this->httpRespBody = $httpRespBody;
}
/**
* Get the HTTP status code
*
* @return int
*/
public function getHttpStatusCode()
{
return $this->httpStatusCode;
}
/**
* Get the HTTP error message
*
* @return string
*/
public function getHttpErrorMessage()
{
return $this->httpErrorMessage;
}
/**
* Get the HTTP response body
*
* @return mixed
*/
public function getHttpRespBody()
{
return $this->httpRespBody;
}
}