| 1 | <?php |
||
| 19 | abstract class AbstractResponse implements ResponseInterface |
||
| 20 | { |
||
| 21 | |||
| 22 | /** |
||
| 23 | * The embodied request object. |
||
| 24 | * |
||
| 25 | * @var RequestInterface |
||
| 26 | */ |
||
| 27 | protected $request; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * The data contained in the response. |
||
| 31 | * |
||
| 32 | * @var mixed |
||
| 33 | */ |
||
| 34 | protected $data; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Constructor |
||
| 38 | * |
||
| 39 | * @param RequestInterface $request the initiating request. |
||
| 40 | * @param mixed $data |
||
| 41 | */ |
||
| 42 | 25 | public function __construct(RequestInterface $request, $data) |
|
| 47 | |||
| 48 | /** |
||
| 49 | * Get the initiating request object. |
||
| 50 | * |
||
| 51 | * @return RequestInterface |
||
| 52 | */ |
||
| 53 | 1 | public function getRequest() |
|
| 57 | |||
| 58 | |||
| 59 | /** |
||
| 60 | * Get the response data. |
||
| 61 | * |
||
| 62 | * @return mixed |
||
| 63 | */ |
||
| 64 | 1 | public function getData() |
|
| 68 | } |
||
| 69 |