ZoneEditService
class ZoneEditService (View source)
Saves the zone editor's record table: the edit gate, the stale-form check, the per-row diff and write, the record and zone comments, and the SOA serial bump that closes a save.
Methods
No description
Holds the audit lines of the rows written from now on until releaseAudit(), so the lines of a save that is rolled back never reach the log.
Writes the held audit lines when the transaction committed, drops them otherwise, and stops holding.
Previews each change and collects the stored content of the records that pass validation and really move away from an RRset another change in the same save writes to. The writes run one by one, so a swap would otherwise be refused as a copy. The caller writes them in one transaction and rolls back on any refusal; a save with no such overlap gets an empty set and keeps saving row by row.
Normalises one row and compares it with the zone, writing nothing.
Writes one changed row without bumping the serial: the record, its audit line, and the record comment with its PTR/A sync when comments are shown.
Details
__construct(ConfigurationInterface $config, PermissionService $permissions, ZoneRepositoryInterface $zones, DomainRepositoryInterface $domains, RecordLookupInterface $records, RecordManagerInterface $recordManager, SOARecordManagerInterface $soaRecords, RecordCommentEditorInterface $comments, RecordCommentSyncInterface $commentSync, AuditLoggerInterface $audit, bool $recordCommentsEnabled, bool $zoneCommentsEnabled, TransactionInterface|null $transaction = null)
No description
void
holdAudit()
Holds the audit lines of the rows written from now on until releaseAudit(), so the lines of a save that is rolled back never reach the log.
void
releaseAudit(bool $committed)
Writes the held audit lines when the transaction committed, drops them otherwise, and stops holding.
ZoneSaveResult
save(ZoneEditSubmission $submission)
No description
array
vacatedRecords(array $changes)
Previews each change and collects the stored content of the records that pass validation and really move away from an RRset another change in the same save writes to. The writes run one by one, so a swap would otherwise be refused as a copy. The caller writes them in one transaction and rolls back on any refusal; a save with no such overlap gets an empty set and keeps saving row by row.
ZoneEditRowChange|null
diffRow(ZoneEditSubmission $submission, ZoneEditRow $row)
Normalises one row and compares it with the zone, writing nothing.
A change request files what this reports and replays it through writeRow().
RecordWriteResult
writeRow(ZoneEditSubmission $submission, ZoneEditRowChange $change, array $vacated = [])
Writes one changed row without bumping the serial: the record, its audit line, and the record comment with its PTR/A sync when comments are shown.