https://github.com/EGYG33K/CsvBundle
This bundle is integration for League/Csv in Symfony http://csv.thephpleague.com/
https://github.com/EGYG33K/CsvBundle
Last synced: 8 months ago
JSON representation
This bundle is integration for League/Csv in Symfony http://csv.thephpleague.com/
- Host: GitHub
- URL: https://github.com/EGYG33K/CsvBundle
- Owner: EGYG33K
- Created: 2016-01-31T00:20:43.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2020-04-30T08:42:00.000Z (over 5 years ago)
- Last Synced: 2024-04-24T01:40:58.975Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-symfony - CsvBundle - An integration for thephpleague/csv into Symfony. (Miscellaneous)
README
# csv-bundle
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-travis]][link-travis]
[](https://packagist.org/packages/egyg33k/csv-bundle)
[](https://packagist.org/packages/egyg33k/csv-bundle)
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
``` bash
$ composer require egyg33k/csv-bundle
```
## Usage
``` php
# 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
``` bash
$ phpunit
```
## Security
If you discover any security related issues, please email me@amrsamy.com instead of using the issue tracker.
## Credits
- Amr Samy
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
[ico-travis]: https://travis-ci.org/EGYG33K/CsvBundle.svg?branch=master
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[link-travis]: https://travis-ci.org/EGYG33K/CsvBundle
[link-author]: https://github.com/EGYG33K