Merging in progress
continuous-integration/drone/push Build is passing Details

pull/21/head^2^2
DahmaneYanis 1 year ago
parent c02c7283d7
commit 19d2ed0199

@ -3,15 +3,18 @@
namespace App\Controller; namespace App\Controller;
use App\Connexion; use App\Connexion;
<<<<<<< HEAD
use App\Gateway\AuthGateway; use App\Gateway\AuthGateway;
use App\Gateway\TacticInfoGateway; use App\Gateway\TacticInfoGateway;
use App\Http\HttpResponse; use App\Http\HttpResponse;
use App\Http\ViewHttpResponse; use App\Http\ViewHttpResponse;
use App\Model\AuthModel; use App\Model\AuthModel;
use App\Model\TacticModel; use App\Model\TacticModel;
use App\Gateway\TeamGateway;
use App\Model\TeamModel;
use App\Session\SessionHandle;
use App\Controller\Sub\EditorController;
class UserController { class UserController extends VisitorController {
private TacticModel $tacticMdl; private TacticModel $tacticMdl;
public function __construct() public function __construct()
@ -20,18 +23,6 @@ class UserController {
$this->tacticMdl = new TacticModel(new TacticInfoGateway($con)); $this->tacticMdl = new TacticModel(new TacticInfoGateway($con));
} }
=======
use App\Gateway\TacticInfoGateway;
use App\Gateway\TeamGateway;
use App\Http\HttpResponse;
use App\Http\ViewHttpResponse;
use App\Model\TacticModel;
use App\Model\TeamModel;
use App\Session\SessionHandle;
class UserController extends VisitorController {
>>>>>>> d54559e01d3d734d87c95607d2dfbc5a2a616695
public function home(): HttpResponse { public function home(): HttpResponse {
$listTactic = $this->tacticMdl->getLast(5); $listTactic = $this->tacticMdl->getLast(5);
return ViewHttpResponse::twig("home.twig", ["recentTactic" => $listTactic]); return ViewHttpResponse::twig("home.twig", ["recentTactic" => $listTactic]);
@ -44,12 +35,12 @@ class UserController extends VisitorController {
public function edit(int $id, SessionHandle $session): HttpResponse { public function edit(int $id, SessionHandle $session): HttpResponse {
$model = new TacticModel(new TacticInfoGateway(new Connexion(get_database()))); $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 { public function create(SessionHandle $session): HttpResponse {
$model = new TacticModel(new TacticInfoGateway(new Connexion(get_database()))); $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 { public function open(int $id, SessionHandle $session): HttpResponse {

Loading…
Cancel
Save