1 | <?php |
||
12 | abstract class Transformer |
||
13 | { |
||
14 | /** |
||
15 | * Loop through the items in the collection & run the transform method |
||
16 | * |
||
17 | * @param TransformableCollection $model |
||
18 | * |
||
19 | * @return $this |
||
20 | */ |
||
21 | public function transformCollection(TransformableCollection $model) |
||
25 | |||
26 | /** |
||
27 | * The method that actually converts the data using the map in the class |
||
28 | * |
||
29 | * @param Model $model |
||
30 | * |
||
31 | * @return mixed |
||
32 | */ |
||
33 | abstract public function transform(Model $model); |
||
34 | } |
||
35 |