Data Exporter
Data Exporter is a lightweight library to export data into different formats.
Branch | Github Actions | Coverage |
2.x | ||
master |
Installation using Composer
composer require sonata-project/exporter
Usage
<?php
use Exporter\Handler;
use Exporter\Source\PDOStatementSourceIterator;
use Exporter\Writer\CsvWriter;
// Prepare the data source
$dbh = new \PDO('sqlite:foo.db');
$stm = $dbh->prepare('SELECT id, username, email FROM user');
$stm->execute();
$source = new PDOStatementSourceIterator($stm);
// Prepare the writer
$writer = new CsvWriter('data.csv');
// Export the data
Handler::create($source, $writer)->export();
Documentation
Support
For general support and questions, please use StackOverflow.
If you think you found a bug or you have a feature idea to propose, feel free to open an issue
after looking at the contributing guide.
License
This package is available under the MIT license.
The MIT License (MIT)
Copyright (c) 2010 Thomas Rabaix
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Copyright (c) 2010 Thomas Rabaix
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-
Refactor PropelCollectionSourceIterator::rewind()
By franmomu, 4 months ago
-
Allow consecutive rewind calls
By franmomu, 4 months ago
-
Document property as nullable
By franmomu, 4 months ago
-
Fix
By OskarStark, 4 months ago
-
Add keywords
By OskarStark, 4 months ago
-
Sort keywords
By web-flow, 4 months ago
-
DevKit updates
By OskarStark, 4 months ago
-
DevKit updates (#369)
By web-flow, 4 months ago
-
DevKit updates (#368)
By web-flow, 4 months ago
-
Remove Symfony2 note
By phansys, 4 months ago
-
Manually sync README.md
By OskarStark, 4 months ago
-
Add links for tags
By web-flow, 4 months ago
-
DevKit updates (#363)
By web-flow, 4 months ago
-
DevKit updates (#362)
By web-flow, 4 months ago
-
DevKit updates (#361)
By web-flow, 4 months ago
-
DevKit updates (#360)
By web-flow, 4 months ago
-
DevKit updates (#359)
By web-flow, 4 months ago
-
DevKit updates (#358)
By web-flow, 4 months ago
-
DevKit updates (#357)
By web-flow, 4 months ago
-
DevKit updates (#356)
By web-flow, 4 months ago
-
DevKit updates (#355)
By web-flow, 4 months ago
-
DevKit updates (#354)
By web-flow, 4 months ago
-
DevKit updates (#353)
By web-flow, 4 months ago
-
DevKit updates (#352)
By web-flow, 5 months ago
-
DevKit updates (#351)
By web-flow, 5 months ago
-
DevKit updates (#348)
By web-flow, 5 months ago
-
Drop support for "symfony/*:<4.4"
By jordisala1991, 6 months ago
-
Add `SonataExporterSymfonyBundle` in order to be compatible with Symfony Flex
By jordisala1991, 6 months ago
-
Release 2.3.0 (#344)
By web-flow, 6 months ago
-
Add support for array and traversable (#343)
By web-flow, 6 months ago