1 | <?php |
||
24 | class ApiResponse implements ApiResponseInterface |
||
25 | { |
||
26 | use EntityTrait; |
||
27 | |||
28 | /** |
||
29 | * The stringified response. |
||
30 | * |
||
31 | * @ODM\Field(type="string") |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $response; |
||
35 | |||
36 | /** |
||
37 | * The response object. |
||
38 | * |
||
39 | * @var Response |
||
40 | */ |
||
41 | protected $responseObject; |
||
42 | |||
43 | |||
44 | /** |
||
45 | * @param Response $response |
||
46 | */ |
||
47 | public function __construct(Response $response) { |
||
51 | |||
52 | /** |
||
53 | * Proxies to Response object. |
||
54 | * |
||
55 | * @param string $method |
||
56 | * @param array $args |
||
57 | * |
||
58 | * @return self|Response |
||
59 | * @throws \BadMethodCallException |
||
60 | */ |
||
61 | public function __call($method, $args) |
||
74 | |||
75 | /** |
||
76 | * Get the response object. |
||
77 | * |
||
78 | * @return Response |
||
79 | */ |
||
80 | public function getResponse() |
||
88 | } |
||
89 |