type = 'MX'; $this->name = $record->name; $this->absoluteName = $record->absoluteName; $this->ttl = $record->ttl; $this->class = $record->class; $this->line = $record->line; $this->customData = $record->customData; $this->rdlength = $record->rdlength; $this->rdata = new OPRecordAdapterType(); $this->rdata->preference = $record->rdata->preference; $this->rdata->value = $record->rdata->exchange; } public function toDnsManagerRecord($record) { $processedRecord = [ 'name' => $record['name'], 'type' => $record['type'], 'preference' => $record['prio'], 'exchange' => $record['value'], 'ttl' => $record['ttl'], 'creationDate' => $record['creationDate'], 'modificationDate' => $record['modificationDate'] ]; return Record::tryToCreateFromArray($processedRecord); } }