1 | <?php namespace JobApis\JobsToMail\Jobs\Notifications; |
||
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 | 'source', |
||
21 | 'datePosted', |
||
22 | ]; |
||
23 | |||
24 | /** |
||
25 | * @var string $id Notification ID |
||
26 | */ |
||
27 | protected $id; |
||
28 | |||
29 | /** |
||
30 | * Create a new job instance. |
||
31 | */ |
||
32 | 1 | public function __construct($id = null) |
|
36 | |||
37 | /** |
||
38 | * Generate a CSV a single notification and return the file path |
||
39 | * |
||
40 | * @return string file path for download |
||
41 | */ |
||
42 | 1 | public function handle( |
|
56 | |||
57 | 1 | private function createCsv(Writer $csv, array $items = [], $filename = null) |
|
82 | } |
||
83 |