CoolCMS API

ImportDto
in package

FinalYes

Normalized, format-independent shape of the whole file. The XML parser fills it today and the CSV/JSON parsers fill it the same way, so the validator and executor do not depend on the format.

IMPORTANT: $products is an iterator, not an array (XML up to 100 MB). The parser yields products in a single pass and keeps one card in memory, so it can be iterated only once; a second pass (accessories) must collect its own compact data on the way.

$fileSettings is a proposal from the file, not a decision; the source of truth is the job settings.

IMPORTANT: $rootIssues is complete only after $products has been fully iterated (see ImportIssueBag).

$bundleBag has the same condition: for XML it is complete only after $products has been fully iterated (the parser fills it in the epilogue, see ImportBundleBag); for CSV (no bundles, the bag stays empty) and JSON (whole file in memory) it is ready immediately. Call getBundles() only after exhausting getProducts().

Table of Contents

Properties

$bundleBag  : ImportBundleBag
$fileSettings  : ImportSettingsDto|null
$rootIssues  : ImportIssueBag
$version  : string
$products  : iterable<string|int, mixed>

Methods

__construct()  : mixed
getBundles()  : array<int, ImportBundleDto>
getProducts()  : iterable<int, ImportProductDto>

Properties

$products read-only

private iterable<string|int, mixed> $products

Methods

On this page

Search results