| 1 | <?php |
||
| 8 | class Response extends AbstractResponse |
||
| 9 | { |
||
| 10 | |||
| 11 | /** |
||
| 12 | * Constructor |
||
| 13 | * |
||
| 14 | * @param RequestInterface $request |
||
| 15 | * @param string $data / response data |
||
| 16 | */ |
||
| 17 | 23 | public function __construct(RequestInterface $request, $data) |
|
| 24 | |||
| 25 | |||
| 26 | /** |
||
| 27 | * Whether or not response is successful |
||
| 28 | * |
||
| 29 | * @return bool |
||
| 30 | */ |
||
| 31 | 9 | public function isSuccessful() |
|
| 35 | |||
| 36 | |||
| 37 | /** |
||
| 38 | * Get error message |
||
| 39 | * |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | 3 | public function getErrorMessage() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * @return bool|int |
||
| 53 | */ |
||
| 54 | 2 | public function getErrorCode() |
|
| 62 | } |
||
| 63 |