You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
772 B
40 lines
772 B
<?php
|
|
|
|
class ModelQuestion
|
|
{
|
|
private $gwQuestion;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->gwQuestion = new GatewayQuestion();
|
|
}
|
|
|
|
function getQuestions()
|
|
{
|
|
$questions = $this->gwQuestion->getQuestions();
|
|
return $questions;
|
|
}
|
|
|
|
function deleteQuestionByID($id)
|
|
{
|
|
$this->gwQuestion->deleteQuestionByID($id);
|
|
}
|
|
|
|
function addQuestion($Question)
|
|
{
|
|
$questionId = $this->gwQuestion->addQuestion($Question);
|
|
return $questionId;
|
|
}
|
|
|
|
function getQuestionByID($id) {
|
|
|
|
$question = $this->gwQuestion->getQuestionByID($id);
|
|
return $question;
|
|
}
|
|
|
|
function updateQuestion($id, $Question)
|
|
{
|
|
$this->gwQuestion->updateQuestion($id, $Question);
|
|
}
|
|
}
|