Esempio n. 1
0
 public function __construct($array)
 {
     parent::__construct($array);
     $this->question = Quest::_getField($array, 'question');
     $this->maxRepetitions = Quest::_getField($array, 'maxRepetitions');
     $this->currentIndex = Quest::_getField($array, 'currentIndex');
     for ($i = 0; $i < $this->currentIndex && $i < $this->maxRepetitions; $i++) {
         $this->userAnswers[$i] = Quest::_getField($array, 'answer' . $i);
     }
 }
Esempio n. 2
0
 /**
  *	@params array $array contains instance variables indexed
  *	 	by name.
  */
 public function __construct($array)
 {
     parent::__construct($array);
     $this->quests = Quest::_getField($array, 'quests');
 }