thephpleague/csv — pull request #31 by nyamsprod (2014-03-25 12:24:51+00:00)
Title: Adding Stream Filtering capabilites to CSV library

This pull request adds stream filtering capabilites to the CSV library. With this new capability, parsing a CSV in another encoding charset for example than the one use/expected by the server will be easier.

But the stream filtering capabilities are not limited to encoding filtering. That's why to enable a broader filtering usage we introduce `\League\Csv\Stream\FilterInterface` interface. Any class that implements this interface and extends the [php_user_filter](http://php.net/php_user_filter) class will be usable by the library.

To enable these improvements and to stay backward comptatible we've added a `\League\Csv\Stream\FilterInterface` parameter at the end of each of the following methods signature:

* `Reader::__construct`
* `Reader::getWriter`
* `Writer::__construct`
* `Writer::getReader`

To ease CSV encoding conversion the `\League\Csv\Stream\EncodingFilter` class is also introduced, but nothing prevents you from using your own implementation as this class just implements the `\League\Csv\Stream\FilterInterface` interface.