1 | <?php |
||
18 | class TransformService implements ServiceInterface |
||
19 | { |
||
20 | /** |
||
21 | * Contains Laravel Application instance. |
||
22 | * |
||
23 | * @var Application |
||
24 | */ |
||
25 | protected $app; |
||
26 | |||
27 | /** |
||
28 | * Contains a repository instance. |
||
29 | * |
||
30 | * @var Repository |
||
31 | */ |
||
32 | protected $repository; |
||
33 | |||
34 | /** |
||
35 | * Create a new transform service instance. |
||
36 | * |
||
37 | * @param Application $app |
||
38 | * @param Repository $repository |
||
39 | */ |
||
40 | 120 | public function __construct(Application $app, Repository $repository) |
|
45 | |||
46 | /** |
||
47 | * Execute transform method on specified transformer. |
||
48 | * |
||
49 | * @param Collection $collection |
||
50 | * |
||
51 | * @throws InvalidTransformer |
||
52 | * |
||
53 | * @return Collection |
||
54 | */ |
||
55 | 26 | public function executeOn(Collection $collection) |
|
72 | } |
||
73 |