|
|
@ -2,9 +2,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
namespace API\Gateway;
|
|
|
|
namespace API\Gateway;
|
|
|
|
|
|
|
|
|
|
|
|
use API\PDO;
|
|
|
|
|
|
|
|
use FORM_BusinessClass\BoxQuestion;
|
|
|
|
use FORM_BusinessClass\BoxQuestion;
|
|
|
|
use FORM_BusinessClass\Question;
|
|
|
|
use FORM_BusinessClass\Question;
|
|
|
|
|
|
|
|
use PDO;
|
|
|
|
|
|
|
|
|
|
|
|
class GatewayQuestion
|
|
|
|
class GatewayQuestion
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -58,4 +58,17 @@ class GatewayQuestion
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function updateQuestion(Question $question){
|
|
|
|
|
|
|
|
$query = "UPDATE Question SET content = :content, type = :type, form = :form WHERE id = :id";
|
|
|
|
|
|
|
|
$this->connection->executeQuery($query, array(
|
|
|
|
|
|
|
|
':content' => array($question->getContent(), PDO::PARAM_STR),
|
|
|
|
|
|
|
|
':type' => array(get_class($question), PDO::PARAM_STR),
|
|
|
|
|
|
|
|
':form' => array($question->getForm(), PDO::PARAM_STR),
|
|
|
|
|
|
|
|
':id' => array($question->getId(), PDO::PARAM_STR)
|
|
|
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->connection->executeQuery();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|