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.
3.01-QCM_MuscuMaths/Website/controllers/ControllerUserLobby.php

33 lines
700 B

<?php
class ControllerUserLobby
{
private $mdLobby;
private $twig;
private $vues;
function __construct()
{
global $dns, $user, $pass, $vues, $twig;
session_start();
try {
$this->twig =$twig;
$this->vues = $vues;
$this->mdLobby = new ModelLobby();
$lobbies = $this->mdLobby->getlobbies();
echo $twig->render($vues["lobby"], [
'lobbies' => $lobbies,
]);
} catch (PDOException $e) {
// Gérez les erreurs PDO ici
} catch (Exception $e2) {
// Gérez d'autres erreurs ici
}
}
}