début memory

php
Lucie GOIGOUX 1 year ago
parent 61c24e12b5
commit bb04f79f9b

@ -4,6 +4,8 @@ namespace controller;
use config\Validation;
use Exception;
use gateway\TranslationGateway;
use gateway\VocabularyListGateway;
use model\MdlStudent;
use model\VocabularyList;
@ -60,5 +62,17 @@ abstract class AbsController
public function memory(): void{
global $twig;
try{
$idVoc = Validation::filter_int($_GET['id'] ?? null);
$wordList = (new \gateway\TranslationGateway)->findByIdVoc($idVoc);
}
catch (Exception $e){
throw new Exception("Erreur");
}
echo $twig->render('memory.html');
}
}

@ -20,7 +20,7 @@ class FrontController
$router->setBasePath($altorouterPath);
$router->map('GET', '/', 'AppController');
$router->map('GET|POST', '/[a:action]?', 'NULL');
$router->map('GET|POST', '/[a:action]?/[i:id]?', 'NULL');
$router->map('GET|POST', '/admin/[i:id]/[a:action]?', 'Admin');
$router->map('GET|POST', '/teacher/[i:id]/[a:action]?', 'Teacher');
$router->map('GET|POST', '/student/[i:id]/[a:action]?', 'Student');

Loading…
Cancel
Save