What is an item reader? ============================================================ The item reader is used by the item job to extract item from a source. It can be any class implementing `ItemReaderInterface `__. What types of item readers exists? ------------------------------------------------------------ **Built-in item readers:** * `FixedColumnSizeFileReader `__: read a file line by line, and decode each line with fixed columns size to an array. * `JsonLinesReader `__: read a file line by line, and decode each line as JSON. * `AddMetadataReader `__: decorates another reader by adding static information to each read item. * `IndexWithReader `__: decorates another reader by changing index of each item. * `ParameterAccessorReader `__: read from an inmemory value located at some configurable place. * `SequenceReader `__: read from multiple item reader, one after the other. * `StaticIterableReader `__: read from an iterable you provide during construction. * `CallbackReader `__: read from a ``Closure`` you provide during construction. **Item readers from bridges:** * From ``openspout/openspout`` bridge: * `FlatFileReader `__: read from any CSV/ODS/XLSX file. * From ``doctrine/dbal`` bridge: * `DoctrineDBALQueryOffsetReader `__: execute an SQL query and iterate over results, using a limit + offset pagination strategy. * `DoctrineDBALQueryCursorReader `__: execute an SQL query and iterate over results, using a column based cursor strategy. * From ``doctrine/orm`` bridge: * `EntityReader `__: read from any Doctrine ORM entity. **Item readers for testing purpose:** * `TestDebugReader `__: dummy item reader that you can use in your unit tests. .. seealso:: | :doc:`What is an item job? `