<?php

namespace MGModule\DNSManager2\mgLibs\custom\dns\record\type;
/**
 * rfc1183
 */
class AFSDB extends RecordTypeAbstract {
    public $subtype;
    public $hostname;

    /**
     * @param int|string $subtype Number 1 or 2
     * @return bool
     */
    public function subtypeValidate($subtype){
        return ($subtype == 1 || $subtype == 2);
    }

    /**
     * @param string $hostname Valid hostname
     * @return mixed
     */
    public function hostnameValidate($hostname){
        return filter_var($hostname,FILTER_VALIDATE_DOMAIN,FILTER_FLAG_HOSTNAME);
    }
}