class DnsFormatter (View source)

Normalizes record content before saving; wraps TXT content in quotes when dns.txt_auto_quote is on.

Methods

__construct(ConfigurationInterface $config)

No description

string
formatContent(string $type, string $content)

No description

static string
quoteEch(string $type, string $content)

Writes an SVCB or HTTPS ech value in quotes, the form PowerDNS stores and serves.

static string|null
unquoteEch(string $type, string $content)

The form an SVCB or HTTPS row had when saved before ech was quoted, or null when the content carries no quoted ech value. Duplicate checks look for both forms.

Details

__construct(ConfigurationInterface $config)

No description

Parameters

ConfigurationInterface $config

string formatContent(string $type, string $content)

No description

Parameters

string $type
string $content

Return Value

string

static string quoteEch(string $type, string $content)

Writes an SVCB or HTTPS ech value in quotes, the form PowerDNS stores and serves.

Its API refuses an unquoted ech value ("Not in expected format"); SQL mode reads both.

Parameters

string $type
string $content

Return Value

string

static string|null unquoteEch(string $type, string $content)

The form an SVCB or HTTPS row had when saved before ech was quoted, or null when the content carries no quoted ech value. Duplicate checks look for both forms.

Parameters

string $type
string $content

Return Value

string|null