| 1 | <?php |
||
| 12 | abstract class CommandError |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var BaseCommand |
||
| 16 | */ |
||
| 17 | private $command; |
||
| 18 | /** |
||
| 19 | * @var \Exception |
||
| 20 | */ |
||
| 21 | private $exception; |
||
| 22 | |||
| 23 | public function __construct(BaseCommand $command, \Exception $exception) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @return BaseCommand |
||
| 31 | */ |
||
| 32 | public function getCommand(): BaseCommand |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return \Exception |
||
| 39 | */ |
||
| 40 | public function getException(): \Exception |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return int the status code for HTTP response |
||
| 47 | */ |
||
| 48 | abstract public function getStatusCode(): int; |
||
| 49 | } |
||
| 50 |