1
0
Files
breadcrumb-the-shire/lib/Service/Audit/AuditRepositoryFactory.php

33 lines
1.2 KiB
PHP
Raw Normal View History

2026-03-04 15:56:58 +01:00
<?php
namespace MintyPHP\Service\Audit;
use MintyPHP\Repository\Audit\ApiAuditLogRepository;
2026-03-05 08:26:51 +01:00
use MintyPHP\Repository\Audit\ApiAuditLogRepositoryInterface;
2026-03-04 15:56:58 +01:00
use MintyPHP\Repository\Audit\SystemAuditLogRepository;
2026-03-05 08:26:51 +01:00
use MintyPHP\Repository\Audit\SystemAuditLogRepositoryInterface;
2026-03-04 15:56:58 +01:00
use MintyPHP\Repository\Audit\UserLifecycleAuditRepository;
2026-03-05 08:26:51 +01:00
use MintyPHP\Repository\Audit\UserLifecycleAuditRepositoryInterface;
2026-03-04 15:56:58 +01:00
class AuditRepositoryFactory
{
private ?ApiAuditLogRepository $apiAuditLogRepository = null;
private ?UserLifecycleAuditRepository $userLifecycleAuditRepository = null;
private ?SystemAuditLogRepository $systemAuditLogRepository = null;
2026-03-05 08:26:51 +01:00
public function createApiAuditLogRepository(): ApiAuditLogRepositoryInterface
2026-03-04 15:56:58 +01:00
{
return $this->apiAuditLogRepository ??= new ApiAuditLogRepository();
}
2026-03-05 08:26:51 +01:00
public function createUserLifecycleAuditRepository(): UserLifecycleAuditRepositoryInterface
2026-03-04 15:56:58 +01:00
{
return $this->userLifecycleAuditRepository ??= new UserLifecycleAuditRepository();
}
2026-03-05 08:26:51 +01:00
public function createSystemAuditLogRepository(): SystemAuditLogRepositoryInterface
2026-03-04 15:56:58 +01:00
{
return $this->systemAuditLogRepository ??= new SystemAuditLogRepository();
}
}