Skip to content

EGYG33K/CsvBundle

Repository files navigation

csv-bundle

Software License Build Status Total Downloads Latest Stable Version

This bundle is integration for League/Csv in Symfony

System Requirements

You need PHP >= 5.5.0 and the mbstring extension to use Csv but the latest stable version of PHP/HHVM is recommended.

Install

Via Composer

$ composer require egyg33k/csv-bundle

Usage

# Reader
$reader = $this->container->get('egyg33k.csv.reader');
$csv = $reader::createFromPath('/home/egyg33k/Desktop/org.csv');
var_dump($csv->fetchOne());
#Writer
$writer = $this->container->get('egyg33k.csv.writer');
$csv = $writer::createFromFileObject(new \SplTempFileObject());
$csv->insertOne(['firstname', 'lastname', 'email']);
$csv->output('users.csv');

Documentation

http://csv.thephpleague.com/

Testing

$ phpunit

Security

If you discover any security related issues, please email me@amrsamy.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.