questionResults = array(); } public function addQuestionResult($result) { array_push($this->questionResults, $result); } public function getQuestionResults() { return $this->questionResults; } } /** * A Result per question */ class QuestionResult { private $type; private $answers; // array public function __construct($type, $answers) { $this->type = $type; $this->answers = $answers; } } ?>