CoolCMS API

ImportParserInterface

Common interface of the three format parsers; all fill one `ImportDto`, so validator and executor are format-independent. {@see XmlImportParser}, {@see CsvImportParser} and {@see JsonImportParser} implement it; {@see ImportParserFactory} selects the implementation by `ProductImportFormat`.

Table of Contents

Methods

parse()  : ImportDto

Methods

parse()

public parse(string $absolutePath[, string|null $schemaPath = null ]) : ImportDto
Parameters
$absolutePath : string

absolute path to the file (never from the request, always the job filePath)

$schemaPath : string|null = null

optional xsd shape check; only XML supports it, csv/json ignore the parameter

Tags
throws
ImportParseException

when the file is unusable as a whole (state invalid)

Return values
ImportDto
On this page

Search results