Beispiel #1
0
 /**
  * Get questionsId
  *
  * @return array
  */
 public function getQuestionsId()
 {
     $result = array();
     for ($i = 0; $i < $this->questions->count(); $i++) {
         array_push($result, $this->questions->get($i)->getId());
     }
     return $result;
 }
 /**
  * Get answersId
  *
  * @return array
  */
 public function getCorrectAnswersId()
 {
     $result = array();
     for ($i = 0; $i < $this->answers->count(); $i++) {
         $answer = $this->answers->get($i);
         if ($answer->getIsCorrectAnswer()) {
             array_push($result, $answer->getId());
         }
     }
     return $result;
 }