|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
namespace App\Controller;
|
|
|
|
|
|
|
|
|
|
use App\Connexion;
|
|
|
|
|
|
|
|
|
|
use App\Controller\Sub\EditorController;
|
|
|
|
|
use App\Gateway\TacticInfoGateway;
|
|
|
|
|
use App\Gateway\TeamGateway;
|
|
|
|
|
use App\Http\HttpResponse;
|
|
|
|
@ -13,7 +13,6 @@ use App\Model\TeamModel;
|
|
|
|
|
use App\Session\SessionHandle;
|
|
|
|
|
|
|
|
|
|
class UserController extends VisitorController {
|
|
|
|
|
|
|
|
|
|
public function home(): HttpResponse {
|
|
|
|
|
$model = new TacticModel(new TacticInfoGateway(new Connexion(get_database())));
|
|
|
|
|
$listTactic = $model->getLast(5);
|
|
|
|
@ -27,12 +26,12 @@ class UserController extends VisitorController {
|
|
|
|
|
|
|
|
|
|
public function edit(int $id, SessionHandle $session): HttpResponse {
|
|
|
|
|
$model = new TacticModel(new TacticInfoGateway(new Connexion(get_database())));
|
|
|
|
|
return (new Sub\EditorController($model))->edit($id, $session);
|
|
|
|
|
return (new EditorController($model))->edit($id, $session);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function create(SessionHandle $session): HttpResponse {
|
|
|
|
|
$model = new TacticModel(new TacticInfoGateway(new Connexion(get_database())));
|
|
|
|
|
return (new Sub\EditorController($model))->createNew($session);
|
|
|
|
|
return (new EditorController($model))->createNew($session);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function open(int $id, SessionHandle $session): HttpResponse {
|
|
|
|
|