Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function download( |
||
27 | $exportClass, |
||
28 | string $fileName, |
||
29 | string $writerType = null, |
||
30 | array $headers = [] |
||
31 | ): Response { |
||
32 | |||
33 | $output = (new Writer())->export($exportClass, $writerType); |
||
|
|||
34 | |||
35 | $fileName = $fileName.'.'.$this->makeFileNameExtension($writerType); |
||
36 | |||
37 | return (new ResponseFactory())->makeResponse($writerType, $output, $fileName); |
||
38 | } |
||
45 |