RecordManagerInterface
interface RecordManagerInterface (View source)
Interface for DNS record management operations
Methods
Add a record
Add a record and return its ID
Edit a record. An unchanged save is skipped entirely when dns.bump_serial_on_unchanged_save is off, so nothing bumps the serial then.
What every single write ends with: bump the serial (unless told not to) and rectify. Batch callers pass finalizeZone=false to the writes and call this once when they are done; one holding a transaction bumps the serial inside it and calls this with bumpSerial=false after the commit, since PowerDNS rectifies from committed rows.
Delete a record and everything that pointed at it (template link, comments)
Edit the zone comment
Details
bool
addRecord(int $zone_id, string $name, string $type, string $content, int $ttl, mixed $prio)
Add a record
RecordWriteResult
addRecordGetId(int $zone_id, string $name, string $type, string $content, int $ttl, mixed $prio, int $disabled = 0, bool $finalizeZone = true)
Add a record and return its ID
RecordWriteResult
editRecord(array $record, bool $finalizeZone = true, array|null $comment = null)
Edit a record. An unchanged save is skipped entirely when dns.bump_serial_on_unchanged_save is off, so nothing bumps the serial then.
void
finalizeZone(int $zoneId, bool $bumpSerial = true)
What every single write ends with: bump the serial (unless told not to) and rectify. Batch callers pass finalizeZone=false to the writes and call this once when they are done; one holding a transaction bumps the serial inside it and calls this with bumpSerial=false after the commit, since PowerDNS rectifies from committed rows.
RecordWriteResult
deleteRecord(int|string $rid, bool $finalizeZone = true)
Delete a record and everything that pointed at it (template link, comments)
static string
getZoneComment(PDO $db, int $zone_id)
Get Zone comment
bool
editZoneComment(int $zone_id, string $comment)
Edit the zone comment