class BindZoneFileGenerator (View source)

Generates standard BIND zone files from DNS records.

Output is compatible with Cloudflare import and pdnsutil load-zone.

Constants

COMMENT_MARKER

Prefix of the comment lines that carry a record's Poweradmin comment; the importer reads them back

DISABLED_MARKER

Prefix of the comment lines that carry a disabled record; the importer restores it as disabled

Methods

string
generate(string $zoneName, array $records, bool $includeComments = false, bool $keepDisabled = false)

No description

Details

string generate(string $zoneName, array $records, bool $includeComments = false, bool $keepDisabled = false)

No description

Parameters

string $zoneName
array $records

The zone's records, as the listing returns them

bool $includeComments

Write each record's comment as marker lines directly above it

bool $keepDisabled

Write disabled records as marker lines instead of leaving them out

Return Value

string

The zone file, or '' when no record is left to write