| 1 | <?php  | 
            ||
| 10 | class CsvParser  | 
            ||
| 11 | { | 
            ||
| 12 | /**  | 
            ||
| 13 | * @staticvar string the name of the format  | 
            ||
| 14 | */  | 
            ||
| 15 | const FORMAT_NAME = 'csv';  | 
            ||
| 16 | |||
| 17 | /**  | 
            ||
| 18 | * @staticvar string Spreadsheet class  | 
            ||
| 19 | */  | 
            ||
| 20 | const WORKBOOK_CLASS = 'Akeneo\Component\SpreadsheetParser\Csv\Spreadsheet';  | 
            ||
| 21 | |||
| 22 | /**  | 
            ||
| 23 | * @staticvar string RowIterator class  | 
            ||
| 24 | */  | 
            ||
| 25 | const ROW_ITERATOR_CLASS = 'Akeneo\Component\SpreadsheetParser\Csv\RowIterator';  | 
            ||
| 26 | |||
| 27 | /**  | 
            ||
| 28 | * @staticvar string The name of the sheet  | 
            ||
| 29 | */  | 
            ||
| 30 | const SHEET_NAME = 'default';  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 | * @var SpreadsheetLoader  | 
            ||
| 34 | */  | 
            ||
| 35 | private static $spreadsheetLoader;  | 
            ||
| 36 | |||
| 37 | /**  | 
            ||
| 38 | * Opens a CSV file  | 
            ||
| 39 | *  | 
            ||
| 40 | * @param string $path  | 
            ||
| 41 | *  | 
            ||
| 42 | * @return Spreadsheet  | 
            ||
| 43 | */  | 
            ||
| 44 | public static function open($path)  | 
            ||
| 48 | |||
| 49 | /**  | 
            ||
| 50 | * @return SpreadsheetLoader  | 
            ||
| 51 | */  | 
            ||
| 52 | public static function getSpreadsheetLoader()  | 
            ||
| 64 | |||
| 65 | /**  | 
            ||
| 66 | * @return RowIteratorFactory  | 
            ||
| 67 | */  | 
            ||
| 68 | protected static function createRowIteratorFactory()  | 
            ||
| 72 | }  | 
            ||
| 73 |