class RecordDisplayService (View source)

Service responsible for transforming DNS records for display purposes Implements the Single Responsibility Principle by focusing only on display transformations

Methods

__construct(bool $displayHostnameOnly = false)

No description

transformRecord(array $record, string $zoneName)

Transform a single record for display

array
transformRecords(array $records, string $zoneName)

Transform multiple records for display

string
restoreFqdn(string $hostname, string $zoneName)

Restore the full FQDN from a hostname Used when processing form submissions

bool
isHostnameOnlyEnabled()

Check if hostname-only display is enabled

Details

__construct(bool $displayHostnameOnly = false)

No description

Parameters

bool $displayHostnameOnly

RecordDisplay transformRecord(array $record, string $zoneName)

Transform a single record for display

Parameters

array $record

The record data

string $zoneName

The zone name

Return Value

RecordDisplay

The transformed record for display

array transformRecords(array $records, string $zoneName)

Transform multiple records for display

Parameters

array $records

Array of records

string $zoneName

The zone name

Return Value

array

Array of RecordDisplay objects

string restoreFqdn(string $hostname, string $zoneName)

Restore the full FQDN from a hostname Used when processing form submissions

Parameters

string $hostname

The hostname (may be partial or full)

string $zoneName

The zone name

Return Value

string

The full FQDN

bool isHostnameOnlyEnabled()

Check if hostname-only display is enabled

Return Value

bool