1
0
Files
breadcrumb-the-shire/lib/Service/Directory/DirectoryRepositoryFactory.php
2026-03-04 15:56:58 +01:00

30 lines
839 B
PHP

<?php
namespace MintyPHP\Service\Directory;
use MintyPHP\Repository\Access\RoleRepository;
use MintyPHP\Repository\Org\DepartmentRepository;
use MintyPHP\Repository\Tenant\TenantRepository;
class DirectoryRepositoryFactory
{
private ?TenantRepository $tenantRepository = null;
private ?DepartmentRepository $departmentRepository = null;
private ?RoleRepository $roleRepository = null;
public function createTenantRepository(): TenantRepository
{
return $this->tenantRepository ??= new TenantRepository();
}
public function createDepartmentRepository(): DepartmentRepository
{
return $this->departmentRepository ??= new DepartmentRepository();
}
public function createRoleRepository(): RoleRepository
{
return $this->roleRepository ??= new RoleRepository();
}
}