<?php

namespace MGModule\DNSManager2\mgLibs\custom\dns\record\type;

class CNAME extends RecordTypeAbstract {
    /**
     * A <domain-name> which specifies the canonical or primary name for the owner. The owner name is an alias.
     */
    public $cname;

    /**
     * @param string $cname Valid string
     * @return bool
     */
    public function cnameValidate($cname){
        return is_string($cname);
    }

    public function unify()
    {
        $this->cname = rtrim($this->cname, '.') . '.';
    }
}