ApiDomainRepository
final class ApiDomainRepository implements DomainRepositoryInterface (View source)
Domain lookups for the API backend mode, read through PowerDNS.
Methods
No description
Check if Zone ID exists. Answered from the local database only (the domains table, or the zones table in API backend mode); PowerDNS is not asked.
Get Domain Name by domain ID
Get Domain ID by name
Get the kind of a domain. In API backend mode a zones row without a cached kind costs one round trip to PowerDNS.
Get the master (primary) server stored for a domain, whatever its kind.
Check if a domain is already existing. An invalid zone name never exists.
Get Zones
Get Zone details from Zone ID
Get Zone(s) details from Zone IDs
Every zone as a picker entry, sorted by name, regardless of who owns it.
Get Best Matching in-addr.arpa Zone ID from Domain Name
Answered from zones.zone_name, which Poweradmin writes synchronously on create; zones created out-of-band in PowerDNS are absent, and those have no owner to compare.
Zones whose name ends in ".$suffix", matched case-insensitively and ordered by name.
Details
__construct(PDO $db, ConfigurationInterface $config, ZoneReadBackendInterface&BackendCapabilitiesInterface $backendProvider, SessionInterface $session, LoggerInterface|null $logger = null)
No description
bool
zoneIdExists(int $zid)
Check if Zone ID exists. Answered from the local database only (the domains table, or the zones table in API backend mode); PowerDNS is not asked.
string|null
getDomainNameById(int $id)
Get Domain Name by domain ID
int|null
getDomainIdByName(string $name)
Get Domain ID by name
string
getDomainType(int $id)
Get the kind of a domain. In API backend mode a zones row without a cached kind costs one round trip to PowerDNS.
string|null
getDomainMaster(int $id)
Get the master (primary) server stored for a domain, whatever its kind.
SLAVE and CONSUMER zones both replicate from one; callers that need SLAVE only check the type. In API backend mode a zones row without a cached kind costs one round trip to PowerDNS.
bool
domainExists(string $domain)
Check if a domain is already existing. An invalid zone name never exists.
array
getZones(string $perm, int $userid = 0, string $letterstart = 'all', int $rowstart = 0, int $rowamount = Constants::DEFAULT_MAX_ROWS, string $sortby = 'name', string $sortDirection = 'ASC', bool $excludeReverse = false, bool|null $showSerial = null, bool|null $showTemplate = null, bool $includeHealth = true, bool $includeRecordCount = true)
Get Zones
array
getZoneInfoFromId(int $zid)
Get Zone details from Zone ID
array
getZoneInfoFromIds(array $zones)
Get Zone(s) details from Zone IDs
array
listZoneNames()
Every zone as a picker entry, sorted by name, regardless of who owns it.
int
getBestMatchingZoneIdFromName(string $domain)
Get Best Matching in-addr.arpa Zone ID from Domain Name
array
findZoneIdsByNames(array $names)
Answered from zones.zone_name, which Poweradmin writes synchronously on create; zones created out-of-band in PowerDNS are absent, and those have no owner to compare.
array
findZonesUnder(string $suffix)
Zones whose name ends in ".$suffix", matched case-insensitively and ordered by name.