Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
1 / 1 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | /** @license For full copyright and license information, please see the LICENSE.md file. */ |
| 6 | |
| 7 | namespace App\Core\DataExchange\Application\Service; |
| 8 | |
| 9 | defined('AMMONLY_APP') || exit('Direct script access is forbidden.'); |
| 10 | |
| 11 | use App\Core\DataExchange\Domain\Model\ExportConfigDto; |
| 12 | use App\Core\Engine\Domain\Model\PermissionContext; |
| 13 | use App\Core\Grid\GridRequest; |
| 14 | |
| 15 | /** |
| 16 | * Service contract managing streaming export of module records to CSV or XLSX. |
| 17 | * |
| 18 | * @package App\Core\DataExchange\Application\Service |
| 19 | */ |
| 20 | interface DataExportServiceInterface |
| 21 | { |
| 22 | /** |
| 23 | * Exports records for the requested module according to ExportConfigDto. |
| 24 | * |
| 25 | * @param string $moduleName Target module machine name. |
| 26 | * @param ExportConfigDto $config Export configuration DTO. |
| 27 | * @param PermissionContext $context Active user security context. |
| 28 | * @param GridRequest|null $gridRequest Active grid request for filtered scope. |
| 29 | * @return array{ |
| 30 | * file_path: string, |
| 31 | * file_name: string, |
| 32 | * mime_type: string, |
| 33 | * total_rows: int, |
| 34 | * size_bytes: int |
| 35 | * } |
| 36 | */ |
| 37 | public function export( |
| 38 | string $moduleName, |
| 39 | ExportConfigDto $config, |
| 40 | PermissionContext $context, |
| 41 | ?GridRequest $gridRequest = null |
| 42 | ): array; |
| 43 | } |