Skip to main content

Crate utopia_domains

Crate utopia_domains 

Source
Expand description

Domain names against the Public Suffix List.

PHPRust
Utopia\Domains\DomainDomain
new Domain($domain)Domain::new (the global list) or Domain::with_list
get(), getApex(), getTLD(), getSuffix(), getRule()Domain::get, Domain::apex, Domain::tld, Domain::suffix, Domain::rule
getRegisterable(), getName(), getSub()Domain::registerable, Domain::name, Domain::sub
isKnown(), isICANN(), isPrivate(), isTest()Domain::is_known, Domain::is_icann, Domain::is_private, Domain::is_test
data/data.php (the list Domain includes)PublicSuffixList (PublicSuffixList::EMBEDDED)

The Public Suffix List is embedded in the crate (data/public-suffix-list.txt, exported from the PHP package’s data/data.php by data/export.php) and parsed once, on first use, unless a list is installed with PublicSuffixList::install.

PHP: the registrars and validators of utopia-php/domains are not ported here; the registrars make network calls, which stay in PHP.

Structs§

Domain
A domain name, lower-cased, split against a PublicSuffixList into its suffix, registrable name and subdomain.
PublicSuffixList
The Public Suffix List: every rule as written (com, *.ck, !www.ck) with its section, plus the exception and wildcard rules indexed without their ! and *. prefixes.

Enums§

Error
Why an operation failed.
Section
The section of the Public Suffix List a rule comes from.