egyg33k/csv-bundle

Integration of League CSV into Symfony

Installs: 25 935

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 2

Forks: 1

Open Issues: 1

Type:symfony-bundle

1.0.1 2016-02-05 03:06 UTC

This package is not auto-updated.

Last update: 2024-11-23 18:28:55 UTC


README

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.