19declare(strict_types=1);
29use Psr\Log\LoggerInterface;
47 private readonly IRSS $irss,
48 private readonly LoggerInterface
$log
68 $this->import_mapping[$old_id] = $new_id;
71 public function process(
object $carry): void
79 && $carry->
expected() === ResourceIdentification::class
80 && $carry->hasResult()
82 $carry->setResult($this->
replaceRid($carry->result()));
94 if (!isset($this->import_mapping[
$id])) {
95 $this->log->warning(
"Unresolved resource id {$id}");
99 $this->log->debug(
"Replaced resource id {$id} with {$this->import_mapping[$id]->serialize()}");
100 return $this->import_mapping[
$id];
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Class ResourceIdentification.
Collects resources during normalization and replaces mapped IDs during denormalization.
getResources()
Get all resources collected during normalization.
storeMapping(string $old_id, ResourceIdentification $new_id)
Store a mapping of an old resource id to a new resource id.
__construct(private readonly IRSS $irss, private readonly LoggerInterface $log)
handleNormalization(ResourceIdentification $rid)
replaceRid(ResourceIdentification $rid)
Carries normalized data, its expected type and eventual result through denormalization processors.
Carries a value, context and eventual result through normalization processors.
Interface StorageResource.