1 | <?php |
||
8 | class AuthenticationException extends \Exception |
||
9 | { |
||
10 | /** |
||
11 | * The 3-digit integer result code to set. |
||
12 | * |
||
13 | * @var integer |
||
14 | */ |
||
15 | private $statusCode; |
||
16 | |||
17 | /** |
||
18 | * The reason phrase to use with the provided status code. |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | private $reasonPhrase; |
||
23 | |||
24 | /** |
||
25 | * Construct a new instance of this exception. |
||
26 | * |
||
27 | * @param integer $statusCode The 3-digit integer result code to set. |
||
28 | * @param string $reasonPhrase The reason phrase to use with the provided status code. |
||
29 | */ |
||
30 | public function __construct(int $statusCode, string $reasonPhrase) |
||
36 | |||
37 | /** |
||
38 | * Gets the response status code. |
||
39 | * |
||
40 | * The status code is a 3-digit integer result code of the server's attempt |
||
41 | * to understand and satisfy the request. |
||
42 | * |
||
43 | * @return integer Status code. |
||
44 | */ |
||
45 | public function getStatusCode() : int |
||
49 | |||
50 | /** |
||
51 | * Gets the response reason phrase associated with the status code. |
||
52 | * |
||
53 | * @return string Reason phrase |
||
54 | */ |
||
55 | public function getReasonPhrase() : string |
||
59 | } |
||
60 |