1 | <?php |
||
5 | abstract class Transformer |
||
6 | { |
||
7 | /** |
||
8 | * Base method to transform response data. |
||
9 | * |
||
10 | * @param array $data |
||
11 | * |
||
12 | * @return array |
||
13 | */ |
||
14 | abstract protected function transform(array $data); |
||
15 | |||
16 | /** |
||
17 | * Call the transform method and check the return. |
||
18 | * |
||
19 | * @param array $data |
||
20 | * |
||
21 | * @return array |
||
22 | */ |
||
23 | 6 | public function transformData(array $data) |
|
27 | } |
||
28 |