DnsIdnService
class DnsIdnService (View source)
Service for IDN (Internationalized Domain Name) handling
Constants
| private DOMAIN_CONTENT_TYPES |
|
| private COMPOUND_CONTENT_TYPES |
|
Methods
Human-readable form of a zone name: punycode decoded, anything else unchanged.
UTF-8 alias to show alongside a punycode zone name. Returns an empty string when the name is not punycode, or when the zone name is unknown.
No description
Convert a domain name to its Punycode representation
Check if a domain name is an IDN
Convert domain names in record content to punycode based on record type
Get the first letter of a domain name in UTF-8 format
Details
static string
toDisplay(string $domainName)
Human-readable form of a zone name: punycode decoded, anything else unchanged.
static string
toIdnAlias(string|null $domainName)
UTF-8 alias to show alongside a punycode zone name. Returns an empty string when the name is not punycode, or when the zone name is unknown.
static string
toUtf8(string $domainName)
No description
static string
toPunycode(string $domainName)
Convert a domain name to its Punycode representation
static bool
isIdn(string $domainName)
Check if a domain name is an IDN
static string
convertContentToPunycode(string $type, string $content)
Convert domain names in record content to punycode based on record type
static string
getFirstLetter(string $domainName)
Get the first letter of a domain name in UTF-8 format