quoteGateway = new QuoteGateway($co); $this->cMod = new CommentaryModel(new CommentaryGateway($co)); $this->uMod = new UserModel(new UserGateway($co)); } public function quiz() { global $vues; require_once $vues['quiz']; } public function addComment(){ $id = $_POST['idQuote']; $this->cMod->createComment($_POST['content'],$_POST['idQuote'],$this->uMod->getIdByUsername($_SESSION['user'])); header("Location: /~kemondejar/WF-Website/quote/$id"); } public function favorite(array $args) { global $vues; $userId = 1; $favorites = $this->quoteGateway->getFavorites($userId); require_once $vues['favorite']; } }