| 1 | <?php |
||
| 5 | class Response |
||
| 6 | { |
||
| 7 | // The actual Guzzle response: |
||
| 8 | private $response; |
||
| 9 | |||
| 10 | // Core response: |
||
| 11 | private $headers; |
||
| 12 | private $bodyRaw; |
||
| 13 | private $body; |
||
| 14 | |||
| 15 | // Properties: |
||
| 16 | private $statusCode; |
||
| 17 | private $timestamp; |
||
| 18 | |||
| 19 | public function __construct(\GuzzleHttp\Psr7\Response $response) |
||
| 30 | |||
| 31 | /****************************/ |
||
| 32 | /* */ |
||
| 33 | /* GETTERS */ |
||
| 34 | /* */ |
||
| 35 | /****************************/ |
||
| 36 | |||
| 37 | // Get the status code: |
||
| 38 | public function getStatusCode() |
||
| 42 | |||
| 43 | //ÊGet the timestamp of the request: |
||
| 44 | public function getTimestamp() |
||
| 48 | |||
| 49 | //ÊGet the timestamp of the request: |
||
| 50 | public function getData() |
||
| 54 | |||
| 55 | //ÊConvert the response to JSON: |
||
| 56 | public function toJSON() |
||
| 64 | } |
||
| 65 |