class ReverseRecordCreator (View source)

Methods

__construct(PDO $db, ConfigurationManager $config, AuditService $audit, DomainRepositoryInterface $domainRepository, RecordManagerInterface $recordManager, DnsBackendProvider|null $backendProvider = null)

No description

array
createReverseRecord($name, $type, $content, int $zone_id, $ttl, $prio, string $comment = '', string $account = '')

No description

string|null
getContentRev($type, $content)

No description

bool
deleteReverseRecord(string $type, string $content, string $name)

Find and delete the corresponding PTR record for a given A or AAAA record

array
updateReverseRecord(string $oldType, string $oldContent, string $oldName, string $newType, string $newContent, string $newName, int $zone_id, int $ttl, int $prio, string $comment = '', string $account = '')

Sync the PTR record after an A/AAAA forward record was edited.

bool
deleteForwardRecord(string $ptrName, string $ptrContent)

Find and delete the corresponding A or AAAA record for a given PTR record

Details

__construct(PDO $db, ConfigurationManager $config, AuditService $audit, DomainRepositoryInterface $domainRepository, RecordManagerInterface $recordManager, DnsBackendProvider|null $backendProvider = null)

No description

Parameters

PDO $db
ConfigurationManager $config
AuditService $audit
DomainRepositoryInterface $domainRepository
RecordManagerInterface $recordManager
DnsBackendProvider|null $backendProvider

array createReverseRecord($name, $type, $content, int $zone_id, $ttl, $prio, string $comment = '', string $account = '')

No description

Parameters

$name
$type
$content
int $zone_id
$ttl
$prio
string $comment
string $account

Return Value

array

string|null getContentRev($type, $content)

No description

Parameters

$type
$content

Return Value

string|null

bool deleteReverseRecord(string $type, string $content, string $name)

Find and delete the corresponding PTR record for a given A or AAAA record

Parameters

string $type

Record type (A or AAAA)

string $content

IP address from A/AAAA record

string $name

Hostname from A/AAAA record

Return Value

bool

True if a matching PTR record was found and deleted

array updateReverseRecord(string $oldType, string $oldContent, string $oldName, string $newType, string $newContent, string $newName, int $zone_id, int $ttl, int $prio, string $comment = '', string $account = '')

Sync the PTR record after an A/AAAA forward record was edited.

Removes the stale PTR (best-effort; user may not have created one originally) and creates a new PTR for the updated IP and hostname. Returns success when no PTR-relevant fields changed.

Parameters

string $oldType
string $oldContent
string $oldName
string $newType
string $newContent
string $newName
int $zone_id
int $ttl
int $prio
string $comment
string $account

Return Value

array

bool deleteForwardRecord(string $ptrName, string $ptrContent)

Find and delete the corresponding A or AAAA record for a given PTR record

Parameters

string $ptrName

PTR record name (e.g., 1.0.168.192.in-addr.arpa)

string $ptrContent

PTR record content (hostname)

Return Value

bool

True if a matching A/AAAA record was found and deleted