ResponseMappingTrait
Trait for shared response mapping functionality Used by both SurveyResponses API command and ExportSurveyResultsService
Table of Contents
Methods
- getActualAid() : int|null
- Get the actual answer ID using the shared answer cache.
- getQuestionFieldMap() : array<string|int, mixed>
- Get the question field map.
- mapResponsesToQuestions() : array<string|int, mixed>
- Map survey responses to survey questions.
Methods
getActualAid()
Get the actual answer ID using the shared answer cache.
protected
getActualAid(int $questionID, int $scaleId, string $value) : int|null
Parameters
- $questionID : int
- $scaleId : int
- $value : string
Return values
int|nullgetQuestionFieldMap()
Get the question field map.
protected
getQuestionFieldMap() : array<string|int, mixed>
Return values
array<string|int, mixed>mapResponsesToQuestions()
Map survey responses to survey questions.
protected
mapResponsesToQuestions(array<string|int, mixed> $responses, array<string|int, mixed> $surveyQuestions) : array<string|int, mixed>
Parameters
- $responses : array<string|int, mixed>
- $surveyQuestions : array<string|int, mixed>