major update
This commit is contained in:
36
lib/Service/Settings/SettingRepositoryFactory.php
Normal file
36
lib/Service/Settings/SettingRepositoryFactory.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Service\Settings;
|
||||
|
||||
use MintyPHP\Repository\Access\RoleRepository;
|
||||
use MintyPHP\Repository\Org\DepartmentRepository;
|
||||
use MintyPHP\Repository\Settings\SettingRepository;
|
||||
use MintyPHP\Repository\Tenant\TenantRepository;
|
||||
|
||||
class SettingRepositoryFactory
|
||||
{
|
||||
private ?SettingRepository $settingRepository = null;
|
||||
private ?TenantRepository $tenantRepository = null;
|
||||
private ?RoleRepository $roleRepository = null;
|
||||
private ?DepartmentRepository $departmentRepository = null;
|
||||
|
||||
public function createSettingRepository(): SettingRepository
|
||||
{
|
||||
return $this->settingRepository ??= new SettingRepository();
|
||||
}
|
||||
|
||||
public function createTenantRepository(): TenantRepository
|
||||
{
|
||||
return $this->tenantRepository ??= new TenantRepository();
|
||||
}
|
||||
|
||||
public function createRoleRepository(): RoleRepository
|
||||
{
|
||||
return $this->roleRepository ??= new RoleRepository();
|
||||
}
|
||||
|
||||
public function createDepartmentRepository(): DepartmentRepository
|
||||
{
|
||||
return $this->departmentRepository ??= new DepartmentRepository();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user