1 | <?php |
||
20 | class Factory |
||
21 | { |
||
22 | /** |
||
23 | * @param callable|TransformerInterface $transformer |
||
24 | * @param $data |
||
25 | * @param array $extra |
||
26 | * @return array|null |
||
27 | */ |
||
28 | public static function simpleCollection(callable $transformer, $data, array $extra = []) |
||
32 | |||
33 | /** |
||
34 | * @param callable|TransformerInterface $transformer |
||
35 | * @param $data |
||
36 | * @param array $extra |
||
37 | * @return array|null |
||
38 | */ |
||
39 | public static function simpleItem(callable $transformer, $data, array $extra = []) |
||
43 | |||
44 | /** |
||
45 | * @param callable|TransformerInterface $transformer |
||
46 | * @param $data |
||
47 | * @param array $config |
||
48 | * @param array $extra |
||
49 | * @return array|null |
||
50 | */ |
||
51 | public static function collection(callable $transformer, $data, array $config = [], array $extra = []) |
||
55 | |||
56 | /** |
||
57 | * @param callable|TransformerInterface $transformer |
||
58 | * @param $data |
||
59 | * @param array $config |
||
60 | * @param array $extra |
||
61 | * @return array|null |
||
62 | */ |
||
63 | public static function item(callable $transformer, $data, array $config = [], array $extra = []) |
||
67 | |||
68 | /** |
||
69 | * @param array $config |
||
70 | * @return Transform |
||
71 | */ |
||
72 | public static function transform(array $config = []): Transform |
||
76 | } |
||
77 |