Sonata exporter

Sonata exporter allows you to convert large amount of data from a source to an output format (most generally to a file) by streaming it (hence avoiding too much memory consumption).

Usage

1
2
3
4
5
6
7
8
// This can be any instance of \Iterator
$source = new ArraySourceIterator([/* your data */]);

// This could be any format supported
$writer = new JsonWriter('php://output');

$handler = Handler::create($source, $writer);
$handler->export();