10 Commits

Author SHA1 Message Date
Adrien Loison
462430c9e4 Favor object creation in factories
Instead of passing factories in the constructors and let objects call the factory method, create all dependencies directly in the factories.
2017-08-27 02:33:39 +02:00
Adrien Loison
b7e46740ce Refactor readers for better di (#457)
* Refactor readers to get a proper DI

Similar to what was done with writers, readers also needed to be updated to match the new way of doing things.
This commits promotes a better DI (factories, injection through constructors).

* Escapers should not be singletons

Instead, they should be proper object that can be injected where needed.
2017-08-27 00:01:17 +02:00
Adrien Loison
7f8b95b2f3 Expose Sheet::isActive() to provide info about the last active sheet (#405) 2017-04-15 21:40:19 +02:00
Adrien Loison
752f4bf64e Add ReaderOptions for all readers (#338)
Instead of passing every single option down the chain
2016-10-17 22:41:36 -07:00
Adrien Loison
0978d340f0 Option to keep empty rows (#331)
* Add option to preserve empty rows when reading an XLSX file
* Add option to preserve empty rows when reading a CSV file
* Add option to preserve empty rows when reading an ODS file
2016-10-17 10:20:02 -07:00
Sebastian Fichera
03e85ffc21 Added EOL configuration support while reading CSV files...
Enhancement for #172 issue…
2016-02-11 17:12:54 -06:00
Adrien Loison
8b666fc6cd Fix PHPDoc to work with Augmented Types 2015-11-05 15:48:26 -08:00
Adrien Loison
f8c39287ad Added @api tag for documentation 2015-09-04 11:43:01 -07:00
Adrien Loison
d946f12951 Support for multiple BOMs depending on the selected encoding 2015-07-27 09:36:55 -07:00
Adrien Loison
ae3ee357ff Moved readers to iterators
Instead of the hasNext() / next() syntax, readers now implements the PHP iterator pattern.
It allows readers to be used with a foreach() loop.

All readers now share the same structure (CSV is treated as having exactly one sheet):
- one concrete Reader
- one SheetIterator, exposed by the Reader
- one or more Sheets, returned at every iteration
- one RowIterator, exposed by the Sheet

Introducing the concept of sheets for CSV may be kind of confusing but it makes Spout way more consistent.
Also, this confusion may be resolved by creating a wrapper around the readers if needed.

-- This commit does not delete the old files, not change the folder structure for Writers. This will be done in another commit.
2015-07-26 23:53:17 -07:00