1 | <?php |
||
22 | class HttpException extends \DomainException |
||
23 | { |
||
24 | const STATUS_CODE_LIMIT = 600; |
||
25 | |||
26 | /** |
||
27 | * Unique error identifier. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | protected $identifier; |
||
32 | |||
33 | /** |
||
34 | * Exception description. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $description; |
||
39 | |||
40 | /** |
||
41 | * HTTP status code. |
||
42 | * |
||
43 | * @var int |
||
44 | */ |
||
45 | protected $statusCode; |
||
46 | |||
47 | /** |
||
48 | * HTTP Exception constructor. |
||
49 | * |
||
50 | * @param string $message |
||
51 | * @param string $description |
||
52 | * @param int $code |
||
53 | * @param int $statusCode |
||
54 | * @param \Throwable|null $previous |
||
55 | * |
||
56 | * @throws \RuntimeException |
||
57 | */ |
||
58 | public function __construct( |
||
75 | |||
76 | /** |
||
77 | * Get exception unique identifier. |
||
78 | * |
||
79 | * @return string |
||
80 | */ |
||
81 | public function getIdentifier(): string |
||
85 | |||
86 | /** |
||
87 | * Get exception description. |
||
88 | * |
||
89 | * @return string |
||
90 | */ |
||
91 | public function getDescription(): string |
||
95 | |||
96 | /** |
||
97 | * Get HTTP status code. |
||
98 | * |
||
99 | * @return int |
||
100 | */ |
||
101 | public function getStatusCode(): int |
||
105 | } |
||
106 |