class DomainRecordCreator (View source)

Adds the matching A record in the managed forward zone when a PTR record is created in a reverse zone.

Constants

private IPV4_SUFFIX

private IPV6_SUFFIX

Methods

__construct(ConfigurationInterface $config, DomainRepositoryInterface $domainRepository, RecordManagerInterface $recordManager, IPAddressValidator|null $ipValidator = null, ReverseTtlResolver|null $reverseTtlResolver = null, AuditLoggerInterface|null $audit = null)

No description

array
addDomainRecord(string $name, string $type, string $content, int $zone_id, string $comment = '', string $account = '', Closure|null $zoneAllowed = null)

Create a matching A/AAAA record in the forward zone when adding a PTR record.

Details

__construct(ConfigurationInterface $config, DomainRepositoryInterface $domainRepository, RecordManagerInterface $recordManager, IPAddressValidator|null $ipValidator = null, ReverseTtlResolver|null $reverseTtlResolver = null, AuditLoggerInterface|null $audit = null)

No description

Parameters

ConfigurationInterface $config
DomainRepositoryInterface $domainRepository
RecordManagerInterface $recordManager
IPAddressValidator|null $ipValidator
ReverseTtlResolver|null $reverseTtlResolver
AuditLoggerInterface|null $audit

array addDomainRecord(string $name, string $type, string $content, int $zone_id, string $comment = '', string $account = '', Closure|null $zoneAllowed = null)

Create a matching A/AAAA record in the forward zone when adding a PTR record.

Parameters

string $name

PTR record name - accepts both relative ("55") and FQDN ("55.2.0.192.in-addr.arpa")

string $type

Record type (must be "PTR")

string $content

Forward hostname the PTR points to (e.g. "host.example.com")

int $zone_id

Reverse zone ID

string $comment

Optional record comment

string $account

Optional account name for logging

Closure|null $zoneAllowed

Whether the caller may write to the forward zone, beyond the edit rights the record manager checks

Return Value

array