(2016-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Classes * */ class DnsEntry { public $record; public $ttl; public $class = 'IN'; public $type; public $priority; public $content; public function __construct($record = '', $type = 'A', $content = null, $prio = 0, $ttl = 18000, $class = 'IN') { $this->record = $record; $this->type = $type; $this->content = $content; $this->priority = $prio; $this->ttl = $ttl; $this->class = $class; } public function __toString() { $result = $this->record . "\t" . $this->ttl . "\t" . $this->class . "\t" . $this->type . "\t" . (($this->priority >= 0 && ($this->type == 'MX' || $this->type == 'SRV')) ? $this->priority . "\t" : "") . $this->content . PHP_EOL; return $result; } }