2017 © Pedro Peláez
 

library csv-exporter

CSV Exporter

image

mf/csv-exporter

CSV Exporter

  • Monday, October 9, 2017
  • by MortalFlesh
  • Repository
  • 1 Watchers
  • 0 Stars
  • 17 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

CSV Exporter

Latest Stable Version Total Downloads License Tests and linting Coverage Status, (*1)

Csv exporter for Symfony, (*2)

Installation

$ composer require mf/csv-exporter

Requirements

Usage

For detail explanation see this issue, (*3)

In Symfony Controller action

return (new StreamedResponseFactory(/* ...dependencies */)) // from ->get('service')
    ->createCsv(
        'filename.csv',
        [
            'columns...',
        ],
        function ($offset, $bulk) use ($repository) {
            return $repository->findBulkForExport($offset, $bulk);
        },
        function (array $row) {
            return [
                $row['key'],
            ];
        }
    );

The Versions