SurveyAnswerCache
in package
Table of Contents
Properties
Methods
- getAid() : int|null
- Get the answer ID for an answer.
- getLabel() : string|null
- Get the translated label for an answer.
- load() : mixed
- Load answer data for a survey into the cache.
Properties
$aids
private
array<string|int, mixed>
$aids
= []
[qid][scaleId][code] => aid
$labels
private
array<string|int, mixed>
$labels
= []
[qid][scaleId][code] => text
$loaded
private
bool
$loaded
= false
Methods
getAid()
Get the answer ID for an answer.
public
getAid(int|string|null $qid, int $scaleId, mixed $code) : int|null
Parameters
- $qid : int|string|null
- $scaleId : int
- $code : mixed
Return values
int|nullgetLabel()
Get the translated label for an answer.
public
getLabel(int|string|null $qid, int $scaleId, mixed $code) : string|null
Parameters
- $qid : int|string|null
- $scaleId : int
- $code : mixed
Return values
string|nullload()
Load answer data for a survey into the cache.
public
load(int $surveyId, string $language) : mixed
Parameters
- $surveyId : int
- $language : string