getName()) || !is_string($domain->getName())) { self::badInput("Name must be an string"); } if (strtoupper($domain->getType()) != "MASTER" && strtoupper($domain->getType()) != "SLAVE") { self::badInput("Type must be SLAVE or MASTER"); } $domain->setType(strtoupper($domain->getType())); $domain->setLastCheck(null); $domain->setNotifiedSerial(null); $domain->setAccount(null); } public static function add(DnsDomainsDbo $domain) { self::checkDomain($domain); return DnsDomainsDataAccess::addId($domain); } }