class BatchReverseRecordCreator (View source)

Methods

__construct(PDO $db, ConfigurationManager $config, AuditService $audit, DomainRepositoryInterface $domainRepository, RecordManagerInterface $recordManager, IPAddressValidator|null $ipValidator = null, RecordRepositoryInterface|null $recordRepository = null)

No description

array
createIPv4Network(string $networkPrefix, string $hostPrefix, string $domain, string $zone_id, int $ttl, int $prio = 0, string $comment = '', string $account = '', bool $createForwardRecords = false, bool $onlyMatchingRecords = false, int|null $forwardTtl = null, int|null $matchingPtrTtl = null)

Create PTR records for an IPv4 network

array
createIPv6Network(string $networkPrefix, string $hostPrefix, string $domain, string $zone_id, int $ttl, int $prio = 0, string $comment = '', string $account = '', int $count = 256, bool $createForwardRecords = false, int|null $forwardTtl = null, bool $onlyMatchingRecords = false, int|null $matchingPtrTtl = null)

Create PTR records for an IPv6 /64 network

Details

__construct(PDO $db, ConfigurationManager $config, AuditService $audit, DomainRepositoryInterface $domainRepository, RecordManagerInterface $recordManager, IPAddressValidator|null $ipValidator = null, RecordRepositoryInterface|null $recordRepository = null)

No description

Parameters

PDO $db
ConfigurationManager $config
AuditService $audit
DomainRepositoryInterface $domainRepository
RecordManagerInterface $recordManager
IPAddressValidator|null $ipValidator
RecordRepositoryInterface|null $recordRepository

array createIPv4Network(string $networkPrefix, string $hostPrefix, string $domain, string $zone_id, int $ttl, int $prio = 0, string $comment = '', string $account = '', bool $createForwardRecords = false, bool $onlyMatchingRecords = false, int|null $forwardTtl = null, int|null $matchingPtrTtl = null)

Create PTR records for an IPv4 network

Parameters

string $networkPrefix

The IPv4 network with CIDR (e.g., "192.168.1.0/24" or "10.0.0.0/20")

string $hostPrefix

The hostname prefix to use for records (e.g., "host")

string $domain

The domain suffix for PTR records (e.g., "example.com")

string $zone_id

The ID of the reverse zone

int $ttl

TTL for the PTR records

int $prio

Priority for the records

string $comment

Optional comment for the records

string $account

Optional account name

bool $createForwardRecords

Whether to create corresponding A/AAAA records in forward zone

bool $onlyMatchingRecords

Whether to create PTRs only for existing A records

int|null $forwardTtl

Optional separate TTL for the auto-created forward A records; falls back to $ttl when null

int|null $matchingPtrTtl

Optional override for the PTR TTL in matching-records mode; when null, the matched A record's TTL is used (historical behavior)

Return Value

array

Result of the operation

array createIPv6Network(string $networkPrefix, string $hostPrefix, string $domain, string $zone_id, int $ttl, int $prio = 0, string $comment = '', string $account = '', int $count = 256, bool $createForwardRecords = false, int|null $forwardTtl = null, bool $onlyMatchingRecords = false, int|null $matchingPtrTtl = null)

Create PTR records for an IPv6 /64 network

Parameters

string $networkPrefix

The IPv6 /64 prefix (e.g., "2001:db8:1:1")

string $hostPrefix

The hostname prefix to use for records (e.g., "host")

string $domain

The domain suffix for PTR records (e.g., "example.com")

string $zone_id

The ID of the reverse zone

int $ttl

TTL for the records

int $prio

Priority for the records

string $comment

Optional comment for the records

string $account

Optional account name

int $count

Number of records to create (default 256)

bool $createForwardRecords

Whether to create corresponding A/AAAA records in forward zone

int|null $forwardTtl

Optional separate TTL for the auto-created forward AAAA records; falls back to $ttl when null

bool $onlyMatchingRecords

Whether to create PTRs only for existing AAAA records

int|null $matchingPtrTtl

Optional override for the PTR TTL in matching-records mode; when null, the matched AAAA record's TTL is used

Return Value

array

Result of the operation