forked from fa/breadcrumb-the-shire
33 lines
1.2 KiB
PHP
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();
|
|
}
|
|
}
|