1 | <?php |
||
9 | class JsonResourceTransformer extends Transformer |
||
10 | { |
||
11 | /** |
||
12 | * Determine which class of object should be transform. |
||
13 | * |
||
14 | * @return string |
||
15 | */ |
||
16 | public function objectClass(): string |
||
20 | |||
21 | /** |
||
22 | * Transform the data value to array. |
||
23 | * |
||
24 | * @return array |
||
25 | */ |
||
26 | public function toArray(): array |
||
34 | |||
35 | /** |
||
36 | * Add the pagination information to the response. |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | protected function paginationInformation() |
||
47 | |||
48 | /** |
||
49 | * Get the pagination links for the response. |
||
50 | * |
||
51 | * @param array $paginated |
||
52 | * @return array |
||
53 | */ |
||
54 | protected function paginationLinks($paginated) |
||
63 | |||
64 | /** |
||
65 | * Gather the meta data for the response. |
||
66 | * |
||
67 | * @param array $paginated |
||
68 | * @return array |
||
69 | */ |
||
70 | protected function meta($paginated) |
||
80 | } |
||
81 |