| 1 | <?php |
||
| 16 | abstract class AbstractResponse implements ResponseInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * The embodied request object |
||
| 20 | * |
||
| 21 | * @var RequestInterface |
||
| 22 | */ |
||
| 23 | protected $request; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The data contained in the response |
||
| 27 | * |
||
| 28 | * @var mixed |
||
| 29 | */ |
||
| 30 | protected $data; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Create a response |
||
| 34 | * |
||
| 35 | * @param RequestInterface $request The initiating request |
||
| 36 | * @param mixed $data |
||
| 37 | */ |
||
| 38 | 3 | public function __construct(RequestInterface $request, $data) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Get the initiating request |
||
| 46 | * |
||
| 47 | * @return RequestInterface |
||
| 48 | */ |
||
| 49 | 3 | public function getRequest() |
|
| 53 | |||
| 54 | /** |
||
| 55 | * Get the response data |
||
| 56 | * |
||
| 57 | * @return mixed |
||
| 58 | */ |
||
| 59 | 3 | public function getData() |
|
| 63 | } |
||
| 64 |