ZoneTemplateApplier
class ZoneTemplateApplier (View source)
Applies a zone template to an existing zone: removes the records an earlier application of that template wrote, writes and links the template's records, repoints the zone at the template and reconciles the sync state.
Constants
| private IPV4_REVERSE_TEMPLATE_TYPES |
IPv4 reverse zones (in-addr.arpa) were limited to NS/SOA because early
templates auto-populated A records for webip/mailip. PTR, LUA, CNAME and
TXT are allowed so LUA-driven PTR generation and RFC 2317 delegations are
not silently dropped. IPv6 reverse zones carry no restriction. |
Methods
No description
Whether a template record belongs in the target zone.
Apply a template to a zone, or unlink the zone with template id 0.
Details
__construct(TransactionInterface $transaction, DnsBackendProviderInterface $backendProvider, SOARecordManagerInterface $soaRecordManager, DomainRepositoryInterface $domainRepository, ZoneTemplateRepositoryInterface $zoneTemplateRepository, TemplateRecordLinkRepositoryInterface $recordLinks, ZoneTemplateSyncRepositoryInterface $syncService, ZoneTemplatePlaceholders $placeholders, RecordChangeWriterInterface $changeLogger, LoggerInterface $logger)
No description
static bool
shouldApplyTemplateRecord(string $domain, string $type)
Whether a template record belongs in the target zone.
ZoneWriteResult
applyTemplate(int $zoneId, int $templateId, int $defaultTtl, bool $writeRecords)
Apply a template to a zone, or unlink the zone with template id 0.
The caller has already authorised the change. $writeRecords carries the zone-add grant: without it the earlier records are still removed and the zone repointed, but no template records are written.