2026-02-23 12:58:19 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Service\Auth;
|
|
|
|
|
|
2026-03-05 08:26:51 +01:00
|
|
|
use MintyPHP\Repository\Tenant\TenantRepositoryInterface;
|
2026-02-23 12:58:19 +01:00
|
|
|
|
|
|
|
|
class AuthTenantGateway
|
|
|
|
|
{
|
2026-03-05 08:26:51 +01:00
|
|
|
public function __construct(private readonly TenantRepositoryInterface $tenantRepository)
|
2026-03-04 15:56:58 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-23 12:58:19 +01:00
|
|
|
public function findById(int $tenantId): ?array
|
|
|
|
|
{
|
2026-03-04 15:56:58 +01:00
|
|
|
return $this->tenantRepository->find($tenantId);
|
2026-02-23 12:58:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function findByUuid(string $uuid): ?array
|
|
|
|
|
{
|
2026-03-04 15:56:58 +01:00
|
|
|
return $this->tenantRepository->findByUuid($uuid);
|
2026-02-23 12:58:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function list(): array
|
|
|
|
|
{
|
2026-03-04 15:56:58 +01:00
|
|
|
return $this->tenantRepository->list();
|
2026-02-23 12:58:19 +01:00
|
|
|
}
|
|
|
|
|
}
|