bakaphp /
phalcon-api
| 1 | <?php |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | namespace Gewaer\Exception; |
||
| 6 | |||
| 7 | class HttpException extends Exception |
||
| 8 | {
|
||
| 9 | protected $httpCode; |
||
| 10 | protected $httpMessage = 'FAILED'; |
||
| 11 | protected $data; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Returns the httpcode attached to the exception |
||
| 15 | * |
||
| 16 | * @return string |
||
| 17 | */ |
||
| 18 | public function getHttpCode(): int |
||
| 19 | {
|
||
| 20 | return $this->httpCode; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Returns the http message attached to the exception |
||
| 25 | * |
||
| 26 | * @return string |
||
| 27 | */ |
||
| 28 | public function getHttpMessage(): string |
||
| 29 | {
|
||
| 30 | return $this->httpMessage; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Returns the data attached to the exception |
||
| 35 | * |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | public function getData() |
||
| 39 | {
|
||
| 40 | return $this->data; |
||
| 41 | } |
||
| 42 | } |
||
| 43 |