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