30 lines
839 B
PHP
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();
|
|
}
|
|
}
|