DomainManager
class DomainManager implements DomainManagerInterface (View source)
Service class for managing domains/zones
Constants
| private IPV4_REVERSE_TEMPLATE_TYPES |
Decide whether a template record should be inserted into the target zone. Historically IPv4 reverse zones (in-addr.arpa) were limited to NS/SOA because early templates auto-populated A records for webip/mailip. The allowlist now also covers PTR, LUA, CNAME and TXT so legitimate reverse-zone records (e.g. LUA-driven dynamic PTR generation, RFC 2317 classless delegations) are no longer silently dropped. IPv6 reverse zones (ip6.arpa) carry no restriction. |
Methods
Constructor
Add a domain to the database
Deletes a domain by a given id
Request an immediate AXFR transfer of a secondary zone from its master.
Change Zone Type
Change Slave Zone's Master IP Address
Add a user as an owner of a zone. An existing owner is left as is and reported as success.
Get Zone Template ID for Zone ID
Update All Zone Records for Zone ID with Zone Template
Details
__construct(PDO $db, ConfigurationManager $config, SOARecordManagerInterface $soaRecordManager, DomainRepositoryInterface $domainRepository, DnsBackendProvider|null $backendProvider = null, LoggerInterface|null $logger = null, RecordChangeLogger|null $changeLogger = null, UserContextService|null $userContext = null)
Constructor
ZoneWriteResult
addDomain(object $db, string $domain, int|null $owner, string $type, string $slave_master, int|string $zone_template, array $groupIds = [], string|null $soaEditApi = null)
Add a domain to the database
ZoneWriteResult
deleteDomain(int $id)
Deletes a domain by a given id
bool
retrieveZone(int $id)
Request an immediate AXFR transfer of a secondary zone from its master.
ZoneWriteResult
changeZoneType(string $type, int $id)
Change Zone Type
ZoneWriteResult
changeZoneSlaveMaster(int $zone_id, string $ip_slave_master)
Change Slave Zone's Master IP Address
ZoneWriteResult
addOwnerToZone(int $zone_id, int $user_id)
Add a user as an owner of a zone. An existing owner is left as is and reported as success.
static int
getZoneTemplate(object $db, int $zone_id)
Get Zone Template ID for Zone ID
ZoneWriteResult
updateZoneRecords(string $db_type, int $dns_ttl, int $zone_id, int $zone_template_id)
Update All Zone Records for Zone ID with Zone Template