<?php

class ControllerAccueil
{

    function __construct()
    {
        global $dsn, $user, $pass, $vues, $twig;
        session_start();
        try {
            /*
            $action = "";
            if (isset($_REQUEST['action'])) {
                $action = $_REQUEST['action'];
            }
            */

            echo $twig->render($vues["accueil"]);

            /*
            switch ($action) {
                case "goToSolo":
                    require($vues['Solo']);
                    break;
                case "goToMulti":
                    require($vues['Multi']);
                    break;
                case "goToAdmin":
                    break;
                default:
                    require($vues["Accueil"]);
                    break;
            }
            */
        } catch (PDOException $e) {
            // $dataVueEreur[] = "Erreur inattendue!!! ";
            // require(__DIR__.'/../vues/erreur.php');
        } catch (Exception $e2) {
            // $dataVueEreur[] = "Erreur inattendue!!! ";
            // require ($rep.$vues['erreur']);
        }
    }
}
