RecordWriteBackendInterface
interface RecordWriteBackendInterface (View source)
Record add, edit and delete writes against the DNS backend.
Methods
Add a DNS record.
Add a DNS record and return its ID.
Create a DNS record atomically with optional disabled flag.
Edit an existing DNS record.
Delete a DNS record by ID.
Replace the content of a zone's SOA record. The SQL backend keeps the stored TTL; the API backend rewrites the whole RRset with the configured dns.ttl.
Rewrites the zone's SOA content from its current value as one step, so concurrent writers to the zone cannot both bump from the same serial. The SQL backend locks the SOA row for it; the API backend reads and rewrites the RRset.
Details
bool
addRecord(int $domainId, string $name, string $type, string $content, int $ttl, int $prio)
Add a DNS record.
int|string|null
addRecordGetId(int $domainId, string $name, string $type, string $content, int $ttl, int $prio, array|null $comment = null)
Add a DNS record and return its ID.
int|string|null
createRecordAtomic(int $domainId, string $name, string $type, string $content, int $ttl, int $prio, int $disabled = 0, array|null $comment = null)
Create a DNS record atomically with optional disabled flag.
In SQL mode, wraps the INSERT in a transaction with deadlock retry. In API mode, one RRset REPLACE carries the record and the disabled flag.
bool
editRecord(int|string $recordId, string $name, string $type, string $content, int $ttl, int $prio, int $disabled, array|null $comment = null)
Edit an existing DNS record.
bool
deleteRecord(int|string $recordId)
Delete a DNS record by ID.
bool
replaceSoaContent(int $zoneId, string $content)
Replace the content of a zone's SOA record. The SQL backend keeps the stored TTL; the API backend rewrites the whole RRset with the configured dns.ttl.
bool
rewriteSoaContent(int $zoneId, callable $change)
Rewrites the zone's SOA content from its current value as one step, so concurrent writers to the zone cannot both bump from the same serial. The SQL backend locks the SOA row for it; the API backend reads and rewrites the RRset.