feat: api endpoints

This commit is contained in:
Björn Fromme
2024-12-04 14:18:47 +01:00
parent 7379f5ac93
commit 231aaaac9b
26 changed files with 606 additions and 43 deletions
+7 -7
View File
@@ -3,8 +3,8 @@
namespace App\Controller\Booking;
use App\BusProNet\ApiClient;
use App\BusProNet\DataLoader\PickupDataLoader;
use App\BusProNet\DataLoader\TravelDataLoader;
use App\BusProNet\XmlLoader\PickupXmlLoader;
use App\BusProNet\XmlLoader\TravelXmlLoader;
use App\Form\BookingType;
use App\Form\Model\BookingData;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
@@ -19,11 +19,11 @@ use Symfony\Contracts\Cache\ItemInterface;
class EditController extends AbstractController
{
public function __construct(
private readonly ApiClient $apiClient,
private readonly TravelDataLoader $travelDataLoader,
private readonly PickupDataLoader $pickupDataLoader,
private readonly CacheInterface $cache,
private readonly Security $security,
private readonly ApiClient $apiClient,
private readonly TravelXmlLoader $travelDataLoader,
private readonly PickupXmlLoader $pickupDataLoader,
private readonly CacheInterface $cache,
private readonly Security $security,
) {
}
+5 -5
View File
@@ -3,7 +3,7 @@
namespace App\Controller\Booking;
use App\BusProNet\ApiClient;
use App\BusProNet\DataLoader\TravelDataLoader;
use App\BusProNet\XmlLoader\TravelXmlLoader;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\HttpFoundation\Request;
@@ -16,10 +16,10 @@ use Symfony\Contracts\Cache\ItemInterface;
class IndexController extends AbstractController
{
public function __construct(
private readonly ApiClient $apiClient,
private readonly TravelDataLoader $travelDataLoader,
private readonly CacheInterface $cache,
private readonly Security $security,
private readonly ApiClient $apiClient,
private readonly TravelXmlLoader $travelDataLoader,
private readonly CacheInterface $cache,
private readonly Security $security,
) {
}