41 lines
1.6 KiB
PHP
41 lines
1.6 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace MintyPHP\Module\Audit\Service;
|
||
|
|
|
||
|
|
use MintyPHP\Module\Audit\Repository\ApiAuditLogRepository;
|
||
|
|
use MintyPHP\Module\Audit\Repository\ApiAuditLogRepositoryInterface;
|
||
|
|
use MintyPHP\Module\Audit\Repository\ImportAuditRunRepository;
|
||
|
|
use MintyPHP\Module\Audit\Repository\ImportAuditRunRepositoryInterface;
|
||
|
|
use MintyPHP\Module\Audit\Repository\SystemAuditLogRepository;
|
||
|
|
use MintyPHP\Module\Audit\Repository\SystemAuditLogRepositoryInterface;
|
||
|
|
use MintyPHP\Module\Audit\Repository\UserLifecycleAuditRepository;
|
||
|
|
use MintyPHP\Module\Audit\Repository\UserLifecycleAuditRepositoryInterface;
|
||
|
|
|
||
|
|
class AuditRepositoryFactory
|
||
|
|
{
|
||
|
|
private ?ApiAuditLogRepository $apiAuditLogRepository = null;
|
||
|
|
private ?ImportAuditRunRepository $importAuditRunRepository = 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();
|
||
|
|
}
|
||
|
|
|
||
|
|
public function createImportAuditRunRepository(): ImportAuditRunRepositoryInterface
|
||
|
|
{
|
||
|
|
return $this->importAuditRunRepository ??= new ImportAuditRunRepository();
|
||
|
|
}
|
||
|
|
}
|