2017 © Pedro Peláez
 

library php-csv-builder

Build csv file and save or download it

image

silverkron/php-csv-builder

Build csv file and save or download it

  • Friday, February 23, 2018
  • by Silverkron
  • Repository
  • 1 Watchers
  • 0 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 38 % Grown

The README.md

PHP csv builder

GitHub last commit Latest Stable Version Jarvis approved GitHub license Twitter, (*1)

Build csv file and save or download it. Simple librery to write csv file in your php application, (*2)

Install

Install php-csv-builder with Composer., (*3)

$ composer require silverkron/php-csv-builder

Initialize the class

use CsvBuilder\CsvBuilder;

$csvBuilder = new CsvBuilder();

Available methods

Change default destination path

setFilePath(<string>), (*4)

$csvBuilder->setFilePath('/path/to/file');

Change default file name

setFileName(<string>), (*5)

$csvBuilder->setFileName('/path/to/file');

Set row of titles (required)

setTitles(<array>), (*6)

$csvBuilder->setTitles([
   'Title 1',
   'Title 2',
   'Title 3',
   'Title 4'
]);

Clear all rows

clearRows(<array>), (*7)

$csvBuilder->clearRows();

Add new row (required)

addRow(<array>), (*8)

$csvBuilder->addRow([
    'Column 1',
    'Column 2',
    'Column 3',
    'Column 4',
]);

Build the csv file (required for download)

create(), (*9)

$csvBuilder->create();

Download csv file

download(), (*10)

$csvBuilder->download();

License

The MIT License (MIT). Please see LICENSE for more information., (*11)

The Versions

23/02 2018

dev-master

9999999-dev

Build csv file and save or download it

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by LucaSciacca

csv write php builder

23/02 2018

v1.0.1

1.0.1.0

Build csv file and save or download it

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by LucaSciacca

csv write php builder

23/02 2018

0.0.1

0.0.1.0

Build csv file and save or download it

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by LucaSciacca

csv write php builder

23/02 2018

v1.0.0

1.0.0.0

Build csv file and save or download it

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by LucaSciacca

csv write php builder