ImportBundleBag
in package
FinalYes
Shared collector for `<bundles>`, same trick as {@see ImportIssueBag}.
In XML <bundles> comes after </products>, but ImportDto is returned right after the file
header (streaming), so bundles are collected into a shared mutable bag that the parser fills
while $products is iterated.
IMPORTANT: the bag is complete only after ImportDto::getProducts() has been fully iterated;
reading it earlier loses bundles. For JSON/CSV the parser fills it at DTO construction.
Table of Contents
Properties
- $bundles : array<int, ImportBundleDto>
Methods
- add() : void
- all() : array<int, ImportBundleDto>
Properties
$bundles
private
array<int, ImportBundleDto>
$bundles
= []
Methods
add()
public
add(ImportBundleDto $bundle) : void
Parameters
- $bundle : ImportBundleDto
all()
public
all() : array<int, ImportBundleDto>