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