1 | <?php |
||
21 | abstract class AbstractTransformer implements TransformerInterface |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * @param array $config |
||
26 | */ |
||
27 | public function __construct(array $config = []) |
||
31 | |||
32 | /** |
||
33 | * @return array |
||
34 | */ |
||
35 | public function getIncludes(): array |
||
39 | |||
40 | /** |
||
41 | * @param mixed $data |
||
42 | * @param TransformerInterface|callable $transformer |
||
43 | * @return Item |
||
44 | */ |
||
45 | protected function item($data, $transformer): Item |
||
49 | |||
50 | /** |
||
51 | * @param mixed $data |
||
52 | * @param TransformerInterface|callable $transformer |
||
53 | * @return Collection |
||
54 | */ |
||
55 | protected function collection($data, $transformer): Collection |
||
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | */ |
||
63 | public function __invoke($data, Scope $scope, string $identifier = null) |
||
67 | |||
68 | } |
||
69 |