|
|
il y a 12 ans | |
|---|---|---|
| .. | ||
| lib/Exporter | il y a 12 ans | |
| test | il y a 12 ans | |
| .gitignore | il y a 12 ans | |
| .travis.yml | il y a 12 ans | |
| README.md | il y a 12 ans | |
| composer.json | il y a 12 ans | |
| phpunit.xml.dist | il y a 12 ans | |
Data Exporter is a lightweight library to export data into different formats.
<?php
// Prepare the data source
$dbh = new \PDO('sqlite:foo.db');
$stm = $dbh->prepare('SELECT id, username, email FROM user');
$stm->execute();
$source = new PDOStatementSource($stm);
// Prepare the writer
$writer = new CsvWriter('data.csv');
// Export the data
Handler::create($source, $writer)->export();
Google Groups: For questions and proposals you can post on this google groups