28 lines
558 B
PHP
28 lines
558 B
PHP
<?php
|
|
|
|
namespace MintyPHP\Service\Auth;
|
|
|
|
use MintyPHP\Repository\Tenant\TenantRepository;
|
|
|
|
class AuthTenantGateway
|
|
{
|
|
public function __construct(private readonly TenantRepository $tenantRepository)
|
|
{
|
|
}
|
|
|
|
public function findById(int $tenantId): ?array
|
|
{
|
|
return $this->tenantRepository->find($tenantId);
|
|
}
|
|
|
|
public function findByUuid(string $uuid): ?array
|
|
{
|
|
return $this->tenantRepository->findByUuid($uuid);
|
|
}
|
|
|
|
public function list(): array
|
|
{
|
|
return $this->tenantRepository->list();
|
|
}
|
|
}
|