From 547d7feed68e89957f062b8ed9b988f28c5830ce Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 3 Aug 2025 00:23:11 +0200 Subject: =?UTF-8?q?r=C3=A9organisation=203:=20classes=20controller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/ajax_calendar_visitor.php | 39 -------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/controller/ajax_calendar_visitor.php (limited to 'src/controller/ajax_calendar_visitor.php') diff --git a/src/controller/ajax_calendar_visitor.php b/src/controller/ajax_calendar_visitor.php deleted file mode 100644 index dcdbebd..0000000 --- a/src/controller/ajax_calendar_visitor.php +++ /dev/null @@ -1,39 +0,0 @@ -setTimezone(new DateTimeZone('UTC')); - $end->setTimezone(new DateTimeZone('UTC')); - - // affichage format ISO à l'heure UTC - //$date->format('Y-m-d\TH:i:s\Z'); - - // on prend les évènements se finissant après le début ou commençant avant la fin de la fourchette - $dql = 'SELECT e FROM App\Entity\Event e WHERE e.end >= :start AND e.start <= :end'; - $bulk_data = $entityManager->createQuery($dql) - ->setParameter('start', $start) - ->setParameter('end', $end) - ->getResult(); - - $events = []; - foreach($bulk_data as $one_entry){ - $event = new EventDTO($one_entry); - $events[] = $event->toArray(); - } - - header('Content-Type: application/json'); - echo json_encode($events); - die; -} \ No newline at end of file -- cgit v1.2.3