Letzte Version

This commit is contained in:
Thomas Spohr
2025-08-13 08:35:35 +02:00
parent 266fd69afb
commit 33fa9c8f94
10 changed files with 149 additions and 84 deletions

View File

@@ -1,4 +1,5 @@
<?php
namespace EIS\Component\EIS;
\defined('_JEXEC') or die;
@@ -11,15 +12,24 @@ use Joomla\CMS\Extension\MVCComponent;
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use EIS\Component\EIS\Site\Controller\DownloadController;
return new class implements ServiceProviderInterface
{
public function register(Container $container): void
{
// MVC-Basisregistrierung
$container->registerServiceProvider(new ComponentDispatcherFactory('\\EIS\\Component\\EIS'));
$container->registerServiceProvider(new MVCFactory('\\EIS\\Component\\EIS'));
$container->registerServiceProvider(new RouterFactory('\\EIS\\Component\\EIS'));
// DownloadController explizit registrieren
$container->set(
DownloadController::class,
fn(Container $c) => new DownloadController()
);
// Komponentenschnittstelle
$container->set(
ComponentInterface::class,
static fn(Container $c) => new MVCComponent(