DataExportController
Corex\Config\Data\DataExportController · class · Config layer
Exports the current (filtered) result of a Corex data source to a CSV download (spec 045, US2). manage_options + a nonce gate the admin_post handler; the CSV assembly is the pure {@see csvFor} (registry + {@see CsvWriter}) so it is unit-testable, while the boundary (handle) sets the download headers and streams it. Bounded to a row cap so a large data set never exhausts memory; only the source’s declared columns are written, so no internal/secret field can leak.
Public API
Section titled “Public API”__construct(DataRegistry $registry, CsvWriter $writer)
Section titled “__construct(DataRegistry $registry, CsvWriter $writer)”register(): void
Section titled “register(): void”handle(): void
Section titled “handle(): void”csvFor(string $sourceKey, DataQuery $query): ?string
Section titled “csvFor(string $sourceKey, DataQuery $query): ?string”The CSV string for a source’s current filtered result, or null if the source is unknown. Bounded to MAX_ROWS.