1
0
Files
breadcrumb-the-shire/lib/Service/Audit/AuditRepositoryFactory.php
2026-03-05 08:26:51 +01:00

33 lines
1.2 KiB
PHP

<?php
namespace MintyPHP\Service\Audit;
use MintyPHP\Repository\Audit\ApiAuditLogRepository;
use MintyPHP\Repository\Audit\ApiAuditLogRepositoryInterface;
use MintyPHP\Repository\Audit\SystemAuditLogRepository;
use MintyPHP\Repository\Audit\SystemAuditLogRepositoryInterface;
use MintyPHP\Repository\Audit\UserLifecycleAuditRepository;
use MintyPHP\Repository\Audit\UserLifecycleAuditRepositoryInterface;
class AuditRepositoryFactory
{
private ?ApiAuditLogRepository $apiAuditLogRepository = null;
private ?UserLifecycleAuditRepository $userLifecycleAuditRepository = null;
private ?SystemAuditLogRepository $systemAuditLogRepository = null;
public function createApiAuditLogRepository(): ApiAuditLogRepositoryInterface
{
return $this->apiAuditLogRepository ??= new ApiAuditLogRepository();
}
public function createUserLifecycleAuditRepository(): UserLifecycleAuditRepositoryInterface
{
return $this->userLifecycleAuditRepository ??= new UserLifecycleAuditRepository();
}
public function createSystemAuditLogRepository(): SystemAuditLogRepositoryInterface
{
return $this->systemAuditLogRepository ??= new SystemAuditLogRepository();
}
}