CluPilotCloud/app/Services/Traefik/FakeTraefikWriter.php

27 lines
558 B
PHP

<?php
namespace App\Services\Traefik;
class FakeTraefikWriter implements TraefikWriter
{
/** @var array<string, string> subdomain => target */
public array $routes = [];
public bool $certReady = true;
public function write(string $subdomain, string $targetHost): void
{
$this->routes[$subdomain] = $targetHost;
}
public function remove(string $subdomain): void
{
unset($this->routes[$subdomain]);
}
public function certReachable(string $fqdn): bool
{
return $this->certReady;
}
}