|
|
12 年之前 | |
|---|---|---|
| .. | ||
| lib/Exporter | 12 年之前 | |
| test | 12 年之前 | |
| .gitignore | 12 年之前 | |
| .travis.yml | 12 年之前 | |
| README.md | 12 年之前 | |
| composer.json | 12 年之前 | |
| phpunit.xml.dist | 12 年之前 | |
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