| Methods | 
	
			| 
					
	public
					
					
				 | _proxy(): Module_Skeleton | # | 
	
			| 
					
	public
					
					
				 | get_provider(): string | # | 
	
			| 
					
	public
					
					
				 | providers(): array | # | 
	
			| 
					
	public
					
					
				 | uuid_name(): string | # | 
	
			| 
					
	public
					
					
				 | domain_expiration(string $domain): null|int
		Query database for domain expiration On multi-server lookups that perform DNS lookups independent,
perform batch lookups and pull those records from the database A return of 0 indicates failure
null indicates unknown expiration 
	Query database for domain expiration On multi-server lookups that perform DNS lookups independent,
perform batch lookups and pull those records from the database A return of 0 indicates failure
null indicates unknown expirationParameters
									
										| $domain | domain owned by the account |  Returnsexpiration as unix timestamp | # | 
	
			| 
					
	public
					
					
				 | get_all_domains(): array
		Fetches all domains Context-aware, returns zones for account or all DNS domains 
	Fetches all domains Context-aware, returns zones for account or all DNS domains | # | 
	
			| 
					
	public
					
					
				 | zones(): array | # | 
	
			| 
					
	public
					
					
				 | get_server_from_domain(string $domain, bool $all = false, bool $extended = false): string|array
		Get server on which a domain is hosted 
	Get server on which a domain is hostedParameters
									
										| $all | show all server matches, $all = true: array of all servers, else server |  
										| $extended | when $all, show all metadata |  | # | 
	
			| 
					
	public
					
					
				 | get_parent_domain(string $domain): bool|string
		Get primary domain affiliated with account In multi-server setups query the master DB to find
domains whose invoice matches the parent invoice or domains
that share the same site ID 
	Get primary domain affiliated with account In multi-server setups query the master DB to find
domains whose invoice matches the parent invoice or domains
that share the same site IDReturnsprimary domain or false on error | # | 
	
			| 
					
	public
					
					
				 | get_whois_record(string $domain): string|bool
		Query WHOIS server for record 
	Query WHOIS server for recordParameters
									
										| $domain | domain name to look up the whois record for |  Returns | # | 
	
			| 
					
	public
					
					
				 | zone_exists(string $zone): bool | # | 
	
			| 
					
	public
					
					
				 | configured(): bool
		DNS handler is configured for account Weaker form of enabled() 
	DNS handler is configured for account Weaker form of enabled() | # | 
	
			| 
					
	public
					
					
				 | enabled(): bool
		DNS is enabled for account Stricter version of configured().
Requires module to faithfully implement DNS functions. 
	DNS is enabled for account Stricter version of configured().
Requires module to faithfully implement DNS functions. | # | 
	
			| 
					
	public
					
					
				 | export(string|null $zone = null): bool|string
		Export zone configuration in BIND-friendly notation 
	Export zone configuration in BIND-friendly notation | # | 
	
			| 
					
	public
					
					
				 | permitted_records(): array
		Get permitted records for DNS provider 
	Get permitted records for DNS provider | # | 
	
			| 
					
	public
					
					
				 | get_records_external(
	string $subdomain = '',
	string $rr = 'any',
	string $domain = null,
	array $nameservers = null,
): array|bool
		Get DNS record(s) from a third-party nameserver When using same nameservers as hosting ns, ensure ns uses split-view 
	Get DNS record(s) from a third-party nameserver When using same nameservers as hosting ns, ensure ns uses split-viewParameters
									
										| $subdomain | optional subdomain |  
										| $rr | optional RR type |  
										| $domain | optional domain |  
										| $nameservers | optional nameserver to query |  Returns | # | 
	
			| 
					
	public
					static
					
				 | record2const(string $rr): int
		Translate RR into PHP constant NB Used by DNS Manager 
	Translate RR into PHP constant NB Used by DNS Manager | # | 
	
			| 
					
	public
					
					
				 | gethostbyaddr_t(string $ip, int $timeout = DNS_LOOKUP_TIMEOUT): string|null|false
		Returns the host name of the Internet host specified by $ip with timeout 
	Returns the host name of the Internet host specified by $ip with timeoutReturnsfalse on error, null on missing record | # | 
	
			| 
					
	public
					
					
				 | gethostbyname_t(string $name, int $timeout = DNS_LOOKUP_TIMEOUT): bool|null|string
		Returns the IP of the Internet host specified by $host with timeout 
	Returns the IP of the Internet host specified by $host with timeout | # | 
	
			| 
					
	public
					
					
				 | domain_hosted(string $domain, bool $ignore_on_account = false): bool
		Check whether a domain is hosted on any server In multi-server setups, ensure all servers are named
SERVER_NAME_SHORT (first component of "hostname" command) 
	Check whether a domain is hosted on any server In multi-server setups, ensure all servers are named
SERVER_NAME_SHORT (first component of "hostname" command)Parameters
									
										| $ignore_on_account | domains hosted on account ignored |  | # | 
	
			| 
					
	public
					
					
				 | domain_on_account(string $domain): bool
		Domain exists and is under the account on a multi-server instance Useful when doing cross-server transfers to ensure the domain to add
is part of the account, which will allow the domain to be added via
the aliases_add_domain @{see Aliases_Module::add_domain} Implementation details are available on github.com/apisnetworks/apnscp-modules 
	Domain exists and is under the account on a multi-server instance Useful when doing cross-server transfers to ensure the domain to add
is part of the account, which will allow the domain to be added via
the aliases_add_domain @{see Aliases_Module::add_domain} Implementation details are available on github.com/apisnetworks/apnscp-modules | # | 
	
			| 
					
	public
					
					
				 | get_pending_expirations(int $days = 30, bool $showExpired = true): array
		Get recently expiring domains Sample response:
Array(
[0] => Array(
'domain' => 'apnscp.com',
'ts' => 1469937612
)
) 
	Get recently expiring domains Sample response:
Array(
[0] => Array(
'domain' => 'apnscp.com',
'ts' => 1469937612
)
)Parameters
									
										| $days | lookahead n days |  
										| $showExpired | show domains expired within the last 10 days |  | # | 
	
			| 
					
	public
					
					
				 | check_zone(string $zone, Record[] $recs = []): bool
		Check zone data with bind 
	Check zone data with bind | # | 
	
			| 
					
	public
					
					
				 | update(string $hostname, string $ip = null): string|bool
		Update hostname with caller's IP4 address 
	Update hostname with caller's IP4 addressParameters
									
										| $hostname | fqdn |  
										| $ip | optional ip address to skip detection |  Returnsip address or false on failure | # | 
	
			| 
					
	public
					
					
				 | get_records(string $subdomain = '', string $rr = 'any', string $domain = null): array|false
	
							Parameters
									
										| $subdomain | optional subdomain |  
										| $rr | optional RR type |  
										| $domain | optional domain |  | # | 
	
			| 
					
	public
					
					
				 | add_record(string $zone, string $subdomain, string $rr, string $param, int $ttl = self::DNS_TTL): bool
		Add a DNS record to a domain 
	Add a DNS record to a domainParameters
									
										| $zone | zone name (normally domain name) |  
										| $subdomain | name of the record to add |  
										| $rr | resource record type [MX, A, AAAA, CNAME, NS, TXT, DNAME] |  
										| $param | parameter value |  
										| $ttl | TTL value, default value 86400 |  | # | 
	
			| 
					
	public
					
					
				 | add_record_conditionally(string $zone, string $subdomain, string $rr, string $param, int $ttl = self::DNS_TTL): bool
		Add a DNS record to a domain if no other record exists Purposed for Lararia\Jobs\SimpleCommandJob 
	Add a DNS record to a domain if no other record exists Purposed for Lararia\Jobs\SimpleCommandJobParameters
									
										| $zone | zone name (normally domain name) |  
										| $subdomain | name of the record to add |  
										| $rr | resource record type [MX, A, AAAA, CNAME, NS, TXT, DNAME] |  
										| $param | parameter value |  
										| $ttl | TTL value, default value 86400 |  | # | 
	
			| 
					
	public
					
					
				 | modify_record(string $zone, string $subdomain, string $rr, string $parameter, array $newdata): bool
	
							Parameters
									
										| $newdata | new zone data (name, rr, ttl, parameter) |  | # | 
	
			| 
					
	public
					
					
				 | record_exists(string $zone, string $subdomain, string $rr = 'ANY', string $parameter = ''): bool | # | 
	
			| 
					
	public
					
					
				 | add_zone_backend(string $domain, string $ip): bool
		Create DNS zone privileged mode 
	Create DNS zone privileged mode | # | 
	
			| 
					
	public
					
					
				 | ip_allocated(string $ip): bool
		Check whether IP is assigned Assigned IP addresses will have PTRs. Unassigned will be empty. 
	Check whether IP is assigned Assigned IP addresses will have PTRs. Unassigned will be empty. | # | 
	
			| 
					
	public
					
					
				 | reset(string $domain): bool
		Reset domain to pristine DNS state 
	Reset domain to pristine DNS stateThrows | # | 
	
			| 
					
	public
					
					
				 | flush(string $domain): bool
		Flush DNS cache for domain 
	Flush DNS cache for domain | # | 
	
			| 
					
	public
					
					
				 | import_from_ns(string $domain, string $nameserver, string|null $key = null): bool
		Import zone data for domain, overwriting configuration on server 
	Import zone data for domain, overwriting configuration on server | # | 
	
			| 
					
	public
					
					
				 | import_from_domain(string $domain, string $src): bool
		Import records from hosted domain 
	Import records from hosted domainParameters
									
										| $domain | target domain to import records into |  
										| $src | hosted domain to derive records from |  | # | 
	
			| 
					
	public
					
					
				 | import(string $domain, string $axfr): bool
		Import raw AXFR records into zone 
	Import raw AXFR records into zone | # | 
	
			| 
					
	public
					
					
				 | empty_zone(string $domain): bool
		Remove all records in zone except for SOA/NS 
	Remove all records in zone except for SOA/NS | # | 
	
			| 
					
	public
					
					
				 | validate_template(string $file, array $overrideParams = []): bool
	
							Parameters
									
										| $overrideParams | additional params to pass to site creation |  | # | 
	
			| 
					
	public
					
					
				 | get_zone_information(string|null $domain = null): null|array
		array get_zone_information (string) Reads zone information for a given domain on the nameservers. 
	array get_zone_information (string) Reads zone information for a given domain on the nameservers.Parameters
									
										| $domain | domain or current domain to check |  | # | 
	
			| 
					
	public
					
					
				 | remove_record(string $zone, string $subdomain, string $rr, string $param = ''): bool
		bool remove_record (string, string)
Removes a record from a zone. 
	bool remove_record (string, string)
Removes a record from a zone.Parameters
									
										| $zone | base domain |  
										| $subdomain | subdomain, leave blank for base domain |  
										| $rr | resource record type, possible values:
[MX, TXT, A, AAAA, NS, CNAME, DNAME, SRV] |  
										| $param | record context |  Returnsoperation completed successfully or not | # | 
	
			| 
					
	public
					
					
				 | release_ip(string $ip): bool
	 | # | 
	
			| 
					
	public
					
					
				 | get_default(string $key): mixed|null | # | 
	
			| 
					
	public
					
					
				 | min_ttl(): int | # | 
	
			| 
					
	public
					
					
				 | _delete()
	 | # | 
	
			| 
					
	public
					
					
				 | remove_zone_backend(string $domain): bool
		Remove zone from nameserver 
	Remove zone from nameserver | # | 
	
			| 
					
	public
					
					
				 | _edit()
	 | # | 
	
			| 
					
	public
					
					
				 | _create()
	 | # | 
	
			| 
					
	public
					
					
				 | add_zone(string $domain, string $ip): bool | # | 
	
			| 
					
	public
					
					
				 | parented(string $hostname): bool | # | 
	
			| 
					
	public
					
					
				 | get_public_ip(): string|array|null
		Get public IPv4 address(es) 
	Get public IPv4 address(es)Returnssingle IP, multiple IPs, or null if not configured | # | 
	
			| 
					
	public
					
					
				 | get_public_ip6(): string|array|null
		Get public IPv6 address(es) 
	Get public IPv6 address(es)Returnssingle IP, multiple IPs, or null if not configured | # | 
	
			| 
					
	public
					
					
				 | provisioning_records(string $zone, string $subdomain = ''): Record[]
		Get base provisioning DNS records to setup automatically 
	Get base provisioning DNS records to setup automaticallyParameters | # | 
	
			| 
					
	public
					
					
				 | uuid(): null|string | # | 
	
			| 
					
	public
					
					
				 | domain_uses_nameservers(string $domain): bool
		Lookup and compare nameservers for domain to host 
	Lookup and compare nameservers for domain to host | # | 
	
			| 
					
	public
					
					
				 | get_hosting_nameservers(string $domain = null): array
		Get configured hosting nameservers Toggled via config.ini > [dns] > hosting_ns 
	Get configured hosting nameservers Toggled via config.ini > [dns] > hosting_ns | # | 
	
			| 
					
	public
					
					
				 | get_authns_from_host(string $host): array|null
		Get authoritative nameservers for given hostname Example response:
Array
(
[0] => Array
(
[host] => ns2.apisnetworks.com
[type] => A
[ip] => 96.126.122.82
[class] => IN
[ttl] => 83137
)
) 
	Get authoritative nameservers for given hostname Example response:
Array
(
[0] => Array
(
[host] => ns2.apisnetworks.com
[type] => A
[ip] => 96.126.122.82
[class] => IN
[ttl] => 83137
)
)ParametersReturnsauthoritative nameservers or resolver chain incomplete | # | 
	
			| 
					
	public
					
					
				 | remove_zone(string $domain, bool $force = false): bool
		Remove a zone from DNS management No direct access to method as site. Use EditDomain or aliases:remove-domain to manage zone attachments.
Certain DNS providers may also soft delete zones requiring manual removal. 
	Remove a zone from DNS management No direct access to method as site. Use EditDomain or aliases:remove-domain to manage zone attachments.
Certain DNS providers may also soft delete zones requiring manual removal.Parameters
									
										| $force | remove zone as admin bypassing all validation checks |  | # | 
	
			| 
					
	public
					
					
				 | auth_test(string $provider = DNS_PROVIDER_DEFAULT, mixed $key = ''): bool
		Test credentials against configured module 
	Test credentials against configured moduleParameters
									
										| $provider | DNS provider to test |  
										| $key | authentication key |  | # | 
	
			| 
					
	public
					
					
				 | get_records_by_rr(string $rr, string $zone = null): array|null
		Query hosting nameservers for DNS records of named category get_zone_information() example:
Account has two MX records assigned, first the
default MX on debug.com, and a second user-created MX on debug.debug.com.
debug.debug.com was designated an e-mail domain through Mail Routing
Email_Module::add_virtual_transport() apis> $c->dns_get_records_by_rr("MX"); array(2)
apis>
array(2) {
[0]=>
array(4) {
["name"]=>
string(10) "debug.com."
["class"]=>
string(2) "IN"
["ttl"]=>
string(5) "86400"
["parameter"]=>
string(18) "10 mail.debug.com."
}
[1]=>
array(4) {
["name"]=>
string(16) "debug.debug.com."
["class"]=>
string(2) "IN"
["ttl"]=>
string(5) "86400"
["parameter"]=>
string(24) "10 mail.debug.debug.com."
}
} 
	Query hosting nameservers for DNS records of named category get_zone_information() example:
Account has two MX records assigned, first the
default MX on debug.com, and a second user-created MX on debug.debug.com.
debug.debug.com was designated an e-mail domain through Mail Routing
Email_Module::add_virtual_transport() apis> $c->dns_get_records_by_rr("MX"); array(2)
apis>
array(2) {
[0]=>
array(4) {
["name"]=>
string(10) "debug.com."
["class"]=>
string(2) "IN"
["ttl"]=>
string(5) "86400"
["parameter"]=>
string(18) "10 mail.debug.com."
}
[1]=>
array(4) {
["name"]=>
string(16) "debug.debug.com."
["class"]=>
string(2) "IN"
["ttl"]=>
string(5) "86400"
["parameter"]=>
string(24) "10 mail.debug.debug.com."
}
}Parameters
									
										| $rr | resource record [MX, A, AAAA, CNAME, DNAME, TXT, SRV] |  Returns | # | 
	
			| 
					
	public
					
					
				 | verified(string $domain): bool
		Domain has been verified and permitted addition 
	Domain has been verified and permitted addition | # | 
	
			| 
					
	public
					
					
				 | verify(string $domain): bool
		Perform verification on domain 
	Perform verification on domain | # | 
	
			| 
					
	public
					
					
				 | challenges(string $domain): array
	
							Returnsns, txt correspond to nameserver delegation, TXT record presence | # | 
	
			| 
					
	public
					
					
				 | raw(string $param, mixed $val): mixed
		Send raw driver-specific command 
	Send raw driver-specific command | # | 
	
			| 
					
	public
					
					
				 | _verify_conf(ConfigurationContext $ctx): bool
	 | # | 
	
			| 
					
	public
					
					
				 | _create_user(string $user)
	 | # | 
	
			| 
					
	public
					
					
				 | _delete_user(string $user)
	 | # | 
	
			| 
					
	public
					
					
				 | _edit_user(string $userold, string $usernew, array $oldpwd)
	 | # |