Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
10 | trait ExportTrait |
||
11 | { |
||
12 | use AbstractTrait; |
||
13 | |||
14 | /** |
||
15 | * Get the facade |
||
16 | * |
||
17 | * @return ExportFacade |
||
18 | */ |
||
19 | protected function exportFacade(): ExportFacade |
||
20 | { |
||
21 | return $this->di()->g(ExportFacade::class); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * Get data for export |
||
26 | * |
||
27 | * @param string $database The database name |
||
28 | * |
||
29 | * @return array |
||
30 | */ |
||
31 | public function getExportOptions(string $database = ''): array |
||
32 | { |
||
33 | $this->connectToDatabase(); |
||
34 | $this->breadcrumbs(true)->item($this->utils->trans->lang('Export')); |
||
35 | return $this->exportFacade()->getExportOptions($database); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Export databases |
||
40 | * The databases and tables parameters are array where the keys are names and the values |
||
41 | * are boolean which indicate whether the corresponding data should be exported too. |
||
42 | * |
||
43 | * @param array $databases The databases to dump |
||
44 | * @param array $tables The tables to dump |
||
45 | * @param array $dumpOptions The export options |
||
46 | * |
||
47 | * @return array|string |
||
48 | */ |
||
49 | public function exportDatabases(array $databases, array $tables, array $dumpOptions) |
||
53 | } |
||
54 | } |
||
55 |