2026-04-02 17:48:27 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Module\Helpdesk;
|
|
|
|
|
|
|
|
|
|
use MintyPHP\App\AppContainer;
|
|
|
|
|
use MintyPHP\App\Container\ContainerRegistrar;
|
2026-04-02 21:46:01 +02:00
|
|
|
use MintyPHP\Http\SessionStoreInterface;
|
2026-04-02 17:48:27 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\BcODataGateway;
|
2026-04-03 16:45:41 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\BcSoapGateway;
|
2026-04-02 17:48:27 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\DebitorDetailService;
|
|
|
|
|
use MintyPHP\Module\Helpdesk\Service\DebitorSearchService;
|
2026-04-06 10:29:59 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\EffectiveHelpdeskSettingsService;
|
2026-04-02 17:48:27 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\HelpdeskOAuthTokenService;
|
|
|
|
|
use MintyPHP\Module\Helpdesk\Service\HelpdeskSettingsGateway;
|
2026-04-06 10:29:59 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\HelpdeskTenantSettingsGateway;
|
2026-04-13 19:28:07 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Repository\HelpdeskTenantSettingsRepository;
|
|
|
|
|
use MintyPHP\Module\Helpdesk\Repository\HelpdeskTokenRepository;
|
2026-04-14 22:16:21 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\SoftwareProductService;
|
|
|
|
|
use MintyPHP\Module\Helpdesk\Service\SoftwareProductSyncService;
|
2026-04-04 18:34:03 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\SystemRecommendationEngine;
|
2026-04-03 16:45:41 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Service\TicketCommunicationService;
|
2026-04-14 22:16:21 +02:00
|
|
|
use MintyPHP\Module\Helpdesk\Handler\SoftwareProductSyncJobHandler;
|
|
|
|
|
use MintyPHP\Module\Helpdesk\Repository\SoftwareProductRepository;
|
2026-04-02 17:48:27 +02:00
|
|
|
use MintyPHP\Service\Access\PermissionService;
|
|
|
|
|
use MintyPHP\Service\Settings\SettingServicesFactory;
|
|
|
|
|
use MintyPHP\Service\Settings\SettingsMetadataGateway;
|
|
|
|
|
|
|
|
|
|
final class HelpdeskContainerRegistrar implements ContainerRegistrar
|
|
|
|
|
{
|
|
|
|
|
public function register(AppContainer $container): void
|
|
|
|
|
{
|
|
|
|
|
$container->set(HelpdeskAuthorizationPolicy::class, static fn (AppContainer $c): HelpdeskAuthorizationPolicy => new HelpdeskAuthorizationPolicy(
|
|
|
|
|
$c->get(PermissionService::class)
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$container->set(HelpdeskSettingsGateway::class, static fn (AppContainer $c): HelpdeskSettingsGateway => new HelpdeskSettingsGateway(
|
|
|
|
|
$c->get(SettingsMetadataGateway::class),
|
|
|
|
|
$c->get(SettingServicesFactory::class)->createSettingsCryptoGateway()
|
|
|
|
|
));
|
|
|
|
|
|
2026-04-06 10:29:59 +02:00
|
|
|
$container->set(HelpdeskTenantSettingsRepository::class, static fn (): HelpdeskTenantSettingsRepository => new HelpdeskTenantSettingsRepository());
|
|
|
|
|
|
|
|
|
|
$container->set(HelpdeskTenantSettingsGateway::class, static fn (AppContainer $c): HelpdeskTenantSettingsGateway => new HelpdeskTenantSettingsGateway(
|
|
|
|
|
$c->get(HelpdeskTenantSettingsRepository::class),
|
|
|
|
|
$c->get(SettingServicesFactory::class)->createSettingsCryptoGateway()
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$container->set(EffectiveHelpdeskSettingsService::class, static fn (AppContainer $c): EffectiveHelpdeskSettingsService => new EffectiveHelpdeskSettingsService(
|
2026-04-02 21:46:01 +02:00
|
|
|
$c->get(HelpdeskSettingsGateway::class),
|
2026-04-06 10:29:59 +02:00
|
|
|
$c->get(HelpdeskTenantSettingsGateway::class),
|
|
|
|
|
$c->get(SessionStoreInterface::class)
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$container->set(BcODataGateway::class, static fn (AppContainer $c): BcODataGateway => new BcODataGateway(
|
|
|
|
|
$c->get(EffectiveHelpdeskSettingsService::class),
|
2026-04-02 21:46:01 +02:00
|
|
|
$c->get(HelpdeskOAuthTokenService::class),
|
|
|
|
|
$c->get(SessionStoreInterface::class)
|
2026-04-02 17:48:27 +02:00
|
|
|
));
|
|
|
|
|
|
2026-04-03 16:45:41 +02:00
|
|
|
$container->set(BcSoapGateway::class, static fn (AppContainer $c): BcSoapGateway => new BcSoapGateway(
|
2026-04-06 10:29:59 +02:00
|
|
|
$c->get(EffectiveHelpdeskSettingsService::class),
|
2026-04-03 16:45:41 +02:00
|
|
|
$c->get(HelpdeskOAuthTokenService::class),
|
|
|
|
|
$c->get(SessionStoreInterface::class)
|
|
|
|
|
));
|
|
|
|
|
|
2026-04-02 17:48:27 +02:00
|
|
|
$container->set(HelpdeskTokenRepository::class, static fn (AppContainer $c): HelpdeskTokenRepository => new HelpdeskTokenRepository(
|
|
|
|
|
$c->get(SettingServicesFactory::class)->createSettingsCryptoGateway()
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$container->set(HelpdeskOAuthTokenService::class, static fn (AppContainer $c): HelpdeskOAuthTokenService => new HelpdeskOAuthTokenService(
|
2026-04-06 10:29:59 +02:00
|
|
|
$c->get(EffectiveHelpdeskSettingsService::class),
|
2026-04-02 17:48:27 +02:00
|
|
|
$c->get(HelpdeskTokenRepository::class)
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$container->set(DebitorSearchService::class, static fn (AppContainer $c): DebitorSearchService => new DebitorSearchService(
|
|
|
|
|
$c->get(BcODataGateway::class),
|
2026-04-06 10:29:59 +02:00
|
|
|
$c->get(EffectiveHelpdeskSettingsService::class)
|
2026-04-02 17:48:27 +02:00
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$container->set(DebitorDetailService::class, static fn (AppContainer $c): DebitorDetailService => new DebitorDetailService(
|
|
|
|
|
$c->get(BcODataGateway::class),
|
2026-04-06 10:29:59 +02:00
|
|
|
$c->get(EffectiveHelpdeskSettingsService::class)
|
2026-04-02 17:48:27 +02:00
|
|
|
));
|
2026-04-03 16:45:41 +02:00
|
|
|
|
|
|
|
|
$container->set(TicketCommunicationService::class, static fn (AppContainer $c): TicketCommunicationService => new TicketCommunicationService(
|
|
|
|
|
$c->get(BcSoapGateway::class),
|
|
|
|
|
$c->get(BcODataGateway::class)
|
|
|
|
|
));
|
2026-04-04 18:34:03 +02:00
|
|
|
|
|
|
|
|
$container->set(SystemRecommendationEngine::class, static fn (): SystemRecommendationEngine => new SystemRecommendationEngine());
|
2026-04-14 22:16:21 +02:00
|
|
|
|
|
|
|
|
$container->set(SoftwareProductRepository::class, static fn (): SoftwareProductRepository => new SoftwareProductRepository());
|
|
|
|
|
|
|
|
|
|
$container->set(SoftwareProductSyncService::class, static fn (AppContainer $c): SoftwareProductSyncService => new SoftwareProductSyncService(
|
|
|
|
|
$c->get(BcODataGateway::class),
|
|
|
|
|
$c->get(SoftwareProductRepository::class),
|
|
|
|
|
$c->get(HelpdeskSettingsGateway::class)
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$container->set(SoftwareProductService::class, static fn (AppContainer $c): SoftwareProductService => new SoftwareProductService(
|
|
|
|
|
$c->get(SoftwareProductRepository::class)
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
$container->set(SoftwareProductSyncJobHandler::class, static fn (AppContainer $c): SoftwareProductSyncJobHandler => new SoftwareProductSyncJobHandler(
|
|
|
|
|
$c->get(SoftwareProductSyncService::class)
|
|
|
|
|
));
|
2026-04-02 17:48:27 +02:00
|
|
|
}
|
|
|
|
|
}
|