line = $record->line; $this->name = $record->name; $this->type = 'SRV'; $this->class = $record->class; $this->ttl = $record->ttl; $this->rdlength = $record->rdlength; $this->rdata = new OPRecordAdapterType(); $this->rdata->priority = $record->rdata->priority; $this->rdata->weight = $record->rdata->weight; $this->rdata->port = $record->rdata->port; $this->rdata->target = $record->rdata->target; $this->absoluteName = $record->absoluteName; $this->customData = $record->customData; } public function toDnsManagerRecord($record) { $valueArray = explode(' ', $record['value'], 3); $templateData = [ 'name' => $record['name'], 'type' => $record['type'], 'priority' => $record['prio'], 'ttl' => $record['ttl'], 'weight' => $valueArray[0], 'port' => $valueArray[1], 'target' => $valueArray[2], ]; return Record::tryToCreateFromArray($templateData); } }