TempIdMapping
in package
This class is responsible for handling and returning tempId <-> real Id mapping of newly created entities as part of the response of PatcherSurvey.
Table of Contents
Properties
- $itemGroupNames : array<string|int, mixed>
- $mapItems : array<string|int, mixed>
Methods
- addTempIdMapItem() : void
- Adds tempIdMapItems to the mapItems array organized by itemGroupNames.
- addTempIdMapItems() : void
- Recursive function to extract TempIdMapItems from the $mappingItem
- getMappingResponseObject() : array<string|int, mixed>
Properties
$itemGroupNames
private
array<string|int, mixed>
$itemGroupNames
= ['questionGroupsMap', 'questionsMap', 'subquestionsMap', 'answersMap']
$mapItems
private
array<string|int, mixed>
$mapItems
= []
Methods
addTempIdMapItem()
Adds tempIdMapItems to the mapItems array organized by itemGroupNames.
public
addTempIdMapItem(TempIdMapItem $tempIdMapItem, string $itemGroupName) : void
Throws an exception if the passed itemGroupName is not known.
Parameters
- $tempIdMapItem : TempIdMapItem
- $itemGroupName : string
Tags
addTempIdMapItems()
Recursive function to extract TempIdMapItems from the $mappingItem
public
addTempIdMapItems(TempIdMapItem|array<string|int, mixed> $mappingItem, string $groupName) : void
Parameters
- $mappingItem : TempIdMapItem|array<string|int, mixed>
- $groupName : string
Tags
getMappingResponseObject()
public
getMappingResponseObject() : array<string|int, mixed>