BindZoneFileParser
class BindZoneFileParser (View source)
BIND zone file parser.
Parses standard BIND zone file format (RFC 1035) with Cloudflare extensions. Informed by PowerDNS ZoneParserTNG patterns.
Constants
| private KNOWN_TYPES |
|
Methods
__construct(int $autoTtlValue = 300)
No description
parse(string $content)
No description
string|null
inferOrigin(array $records)
Infer zone origin from record names when no $ORIGIN directive is present.
int
parseTtl(string $value)
Parse TTL value with optional time suffix.
Details
__construct(int $autoTtlValue = 300)
No description
ParsedZoneFile
parse(string $content)
No description
string|null
inferOrigin(array $records)
Infer zone origin from record names when no $ORIGIN directive is present.
Finds the longest common suffix of all record FQDNs. For example, records like a.example.com, b.example.com → inferred origin: example.com.
int
parseTtl(string $value)
Parse TTL value with optional time suffix.
Supports: s (seconds), m (minutes), h (hours), d (days), w (weeks), y (years)