imag / csv-bundle
Create and manage your CSV
Installs: 7 667
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.3.3
- symfony/symfony: >2.0
This package is auto-updated.
Last update: 2024-11-28 04:35:45 UTC
README
Manage your csv with this bundle.
Install
- Download CsvBundle
- Enable the bundle
How get the bundle
Composer
Modify your composer.json on your project root
// {root}/composer.json { [...], "require": { [...], "imag/csv-bundle": "dev-master" } }
Enable the Bundle
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new IMAG\CsvBundle\IMAGCsvBundle(), ); }
Usage
Create a Csv
<?php // Init the manager $manager = $this->get('imag_csv.manager.csv'); $manager ->setFilename('/tmp/test.csv') ->setDelimiter(',') ->setEnclosure('"') ; // Create a row on Csv $row = $manager->createRow(); $row ->addField('1') ->addField('2') ; $manager->addRow($row); // Write Csv $manager->write();