rdata = new AFSDB(); $this->rdata->subtype = $contentArray[0]; $this->rdata->hostname = $this->contentToRelative(IdnaHelper::idnaDecode($contentArray[1])); } /** * @param AFSDB $rdata * @return string */ public function parseContentToApiFormat( $rdata ) { $content = [ $rdata->subtype, $this->contentToAbsolute(IdnaHelper::idnaEncode($rdata->hostname)) ]; return implode(' ', $content); } }