| 1 | <?php |
||
| 10 | class TextApiResponse implements ResponseInterface |
||
| 11 | { |
||
| 12 | use SmartObject; |
||
| 13 | |||
| 14 | /** @var int */ |
||
| 15 | private $code; |
||
| 16 | |||
| 17 | /** @var mixed */ |
||
| 18 | private $data; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param int $code |
||
| 22 | * @param mixed $data |
||
| 23 | */ |
||
| 24 | 3 | public function __construct(int $code, $data) |
|
| 25 | { |
||
| 26 | 3 | $this->code = $code; |
|
| 27 | 3 | $this->data = $data; |
|
| 28 | 3 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritdoc} |
||
| 32 | */ |
||
| 33 | 3 | public function getCode(): int |
|
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | 3 | public function send(IRequest $httpRequest, IResponse $httpResponse): void |
|
| 49 | } |
||
| 50 |