HostnameValidator
class HostnameValidator (View source)
Hostname validation service
Methods
validate(mixed $hostname, bool $allowWildcard = false)
Validate hostname as FQDN
bool
isValid(string $hostname, bool $allowWildcard = false)
Simple validator for hostname validity
string
normalizeRecordName(string $name, string $zone)
Normalize a DNS record name by ensuring it is fully qualified with the zone name
static bool
endsWith(string $needle, string $haystack)
Matches end of string
Details
__construct(ConfigurationManager $config)
No description
ValidationResult
validate(mixed $hostname, bool $allowWildcard = false)
Validate hostname as FQDN
bool
isValid(string $hostname, bool $allowWildcard = false)
Simple validator for hostname validity
string
normalizeRecordName(string $name, string $zone)
Normalize a DNS record name by ensuring it is fully qualified with the zone name
static bool
endsWith(string $needle, string $haystack)
Matches end of string
Matches end of string (haystack) against another string (needle)