Skip to content

Commit

Permalink
Fixed README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
eko committed Mar 20, 2017
1 parent 414e7a2 commit cf8aa7a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Expand Up @@ -23,14 +23,18 @@ Please provide a version constraint for the sonata-project/exporter requirement:
### Usage

```php

<?php

use Exporter\Handler;
use Exporter\Source\PDOStatementSourceIterator;
use Exporter\Writer\XlsWriter;

// 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);
$source = new PDOStatementSourceIterator($stm);

// Prepare the writer
$writer = new CsvWriter('data.csv');
Expand Down

0 comments on commit cf8aa7a

Please sign in to comment.