<?php

namespace MGModule\DNSManager2\mgLibs\custom\dns\submodules\PowerDNSv4\Adapters;

use MGModule\DNSManager2\mgLibs\custom\dns\record\type\TLSA;

class TLSAAdapter extends AbstractPowerDNSv4Adapter
{
    /**
     * @param TLSA $rdata
     *
     * @return string
     */
    public function parseContentToApiFormat( $rdata )
    {
        $content = [
            $rdata->certusage,
            $rdata->selector,
            $rdata->matchingtype,
            strtolower(trim($rdata->certdata))
        ];
        return implode(' ', $content);
    }
}