1 | <?php |
||
24 | class AbstractResource extends AbstractMiddleware |
||
25 | { |
||
26 | /** |
||
27 | * @var mixed |
||
28 | */ |
||
29 | public $data; |
||
30 | |||
31 | /** |
||
32 | * @var string|callable|TransformerInterface |
||
33 | */ |
||
34 | public $transformer; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | public $config = []; |
||
40 | |||
41 | /** |
||
42 | * @inheritdoc |
||
43 | */ |
||
44 | public function __invoke( |
||
60 | |||
61 | /** |
||
62 | * @return array|null |
||
63 | */ |
||
64 | protected function transform() |
||
72 | |||
73 | /** |
||
74 | * @return callable|TransformerInterface |
||
75 | * @throws \Exception |
||
76 | */ |
||
77 | protected function resolveTransformer() |
||
89 | |||
90 | /** |
||
91 | * @param ResponseInterface $response |
||
92 | * @return ResponseInterface |
||
93 | */ |
||
94 | protected function handleResponse(ResponseInterface $response) |
||
98 | } |
||
99 |