RecordReadBackendInterface
interface RecordReadBackendInterface (View source)
Record lookups by id, name or zone read from the DNS backend.
Methods
Get a single record by ID.
Get zone ID from a record ID.
Check if a record with given attributes exists.
Get records by zone ID, optionally filtered by type.
Get the records at one name in a zone, optionally filtered by type.
Find the records at one name across every zone, optionally filtered by type.
Find the records whose content equals the given value across every zone, optionally filtered by type. The API backend answers through the PowerDNS search endpoint, which stops at 10,000 matches; use findAllRecordsByContent() when a missed record would let a check pass.
findRecordsByContent(), or null when the backend could not see every match.
Get SOA record content for a zone.
Get all records for a zone from the DNS backend.
Details
array|null
getRecordById(int|string $recordId)
Get a single record by ID.
int
getZoneIdFromRecordId(int|string $recordId)
Get zone ID from a record ID.
bool
recordExists(int $domainId, string $name, string $type, string $content)
Check if a record with given attributes exists.
array
getRecordsByZoneId(int $domainId, string|null $type = null)
Get records by zone ID, optionally filtered by type.
array
getRecordsByName(int $domainId, string $name, string|null $type = null)
Get the records at one name in a zone, optionally filtered by type.
Names match case-insensitively, per RFC 4343.
array
findRecordsByName(string $name, string|null $type = null)
Find the records at one name across every zone, optionally filtered by type.
Names match case-insensitively. The API backend reads the RRsets of the most specific zone that holds the name.
array
findRecordsByContent(string $content, string|null $type = null)
Find the records whose content equals the given value across every zone, optionally filtered by type. The API backend answers through the PowerDNS search endpoint, which stops at 10,000 matches; use findAllRecordsByContent() when a missed record would let a check pass.
array|null
findAllRecordsByContent(string $content, string|null $type = null)
findRecordsByContent(), or null when the backend could not see every match.
string
getSOARecord(int $domainId)
Get SOA record content for a zone.
array
getZoneRecords(int $domainId, string $zoneName)
Get all records for a zone from the DNS backend.
Returns a flat array of record data. In SQL mode, records include numeric IDs. In API mode, IDs are resolved from the database. ENT records (null/empty type) are excluded.