public function setDomainName($domain)
    {
        $domain = strtolower($domain);
        if (!$this->getDomainValidator()->isValid($domain)) {
            throw new InvalidArgumentException(
                'Domain name is invalid: ' . $domain
            );
        }

        $this->domain = $domain;
    }