| 1 | <?php |
||
| 10 | abstract class AbstractHttpException extends \Exception implements HttpExceptionInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $data = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var array |
||
| 19 | */ |
||
| 20 | protected $headers = []; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $message = 'Internal Server Error'; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var integer |
||
| 29 | */ |
||
| 30 | protected $statusCode = 500; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Constructor |
||
| 34 | * |
||
| 35 | * @param string $message |
||
| 36 | * @param array $data |
||
| 37 | * @param \Throwable $previous |
||
| 38 | * @param array $headers |
||
| 39 | */ |
||
| 40 | 6 | public function __construct( |
|
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritdoc} |
||
| 54 | */ |
||
| 55 | 3 | public function statusCode() : int |
|
| 59 | |||
| 60 | /** |
||
| 61 | * {@inheritdoc} |
||
| 62 | */ |
||
| 63 | 2 | public function data() : array |
|
| 67 | |||
| 68 | /** |
||
| 69 | * {@inheritdoc} |
||
| 70 | */ |
||
| 71 | 1 | public function headers() : array |
|
| 75 | |||
| 76 | /** |
||
| 77 | * {@inheritdoc} |
||
| 78 | */ |
||
| 79 | 3 | public function message() : ?string |
|
| 83 | |||
| 84 | /** |
||
| 85 | * {@inheritdoc} |
||
| 86 | */ |
||
| 87 | 1 | public function response() : ResponseMessage |
|
| 91 | } |
||
| 92 |