src/Controller/HomeController.php line 30
<?phpnamespace App\Controller;use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;use Symfony\Component\HttpFoundation\Response;use Symfony\Component\HttpFoundation\Request;use Symfony\Component\Routing\Annotation\Route;use Doctrine\Persistence\ManagerRegistry;use Psr\Log\LoggerInterface;use App\Services\ControlParams;class HomeController extends AbstractController{private $control;private $doctrine;private $logger;public function __construct(ManagerRegistry $doctrine, LoggerInterface $logger, string $appEnv){$this->doctrine = $doctrine;$this->logger = $logger;$this->control = new ControlParams($doctrine, $logger, $appEnv);}#[Route('/', methods: ['GET','POST'], name: 'app_home')]public function index(Request $request): Response{$parameters = array();// === +++ Controle +++ ===$params = $this->control->getParams($request);// === +++ +++ ===$parameters['clientIp'] = $params['clientIp'];return $this->render('home/index.html.twig', $parameters );}}