1 | <?php namespace JobApis\JobsToMail\Jobs\Collections; |
||
7 | class GenerateCsv |
||
8 | { |
||
9 | /** |
||
10 | * @var array $csvHeaders |
||
11 | */ |
||
12 | protected $csvHeaders = [ |
||
13 | 'name', |
||
14 | 'description', |
||
15 | 'url', |
||
16 | 'company', |
||
17 | 'location', |
||
18 | 'query', |
||
19 | 'industry', |
||
20 | 'datePosted', |
||
21 | ]; |
||
22 | |||
23 | /** |
||
24 | * @var string $id Collection ID |
||
25 | */ |
||
26 | protected $id; |
||
27 | |||
28 | /** |
||
29 | * Create a new job instance. |
||
30 | */ |
||
31 | 1 | public function __construct($id = null) |
|
35 | |||
36 | /** |
||
37 | * Generate a CSV a single notification and return the file path |
||
38 | * |
||
39 | * @return string file path for download |
||
40 | */ |
||
41 | 1 | public function handle( |
|
55 | |||
56 | 1 | private function createCsv(Writer $csv, array $items = [], $filename = null) |
|
77 | } |
||
78 |