-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
I would propose you split your SDImportData
into smaller parts which would allow at a later point to import json
without having the change the whole parser class.
$csvDataReder = new CsvDataRender(); // Handling of csv specifc data
$dataAnnotator = new DataAnnotator() // Create smw annotation
$dataImportParserFunction = new DataImportParserFunction( $csvDataReder, $dataAnnotator );
$dataImportParserFunction->parse( ... )
You can see [0] how to use injection in a parser function that splits responsibilities and make the code a bit easier to maintain and understood.