SurveyDao

Methods

Loads a survey from the database that has the given ID. If no matching survey is found then null is returned. Note that no results are loaded from this function call, only survey structure/definition.

loadSurveyById(int $id, $lang = null) : \SurveyObj

In the future it would be nice to load all languages from the db at once and have the infrastructure be able to return responses based on language codes.

Arguments

$id

int

$lang

Response

\SurveyObj

Loads results for the survey into the $survey->responses array. The results begin from $minRecord and end with $maxRecord. Either none, or both, the $minRecord and $maxRecord variables must be provided.

loadSurveyResults(\Survey $survey, int $iMinimum, int $iMaximum, string $sFilter = '', string $completionState = 'all') 

If none are then all responses are loaded.

Arguments

$survey

\Survey

$iMinimum

int

$iMaximum

int

$sFilter

string

An optional filter for the results, i string or arry of string

$completionState

string

all, complete or incomplete