SqlDomainRepository
final class SqlDomainRepository implements DomainRepositoryInterface (View source)
Domain lookups on the domains table.
Methods
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
Zone ids for the given lowercased names, matched case-insensitively.
Zones whose name ends in ".$suffix", matched case-insensitively and ordered by name.
Details
__construct(PDO $db, ConfigurationInterface $config)
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)
Zone ids for the given lowercased names, matched case-insensitively.
array
findZonesUnder(string $suffix)
Zones whose name ends in ".$suffix", matched case-insensitively and ordered by name.