private function _validateHostnamePart()
    {
        $hostname = $this->_options['hostname']->setTranslator($this->getTranslator())
                         ->isValid($this->_hostname);
        if (!$hostname) {
            $this->_error(self::INVALID_HOSTNAME);

            // Get messages and errors from hostnameValidator
            foreach ($this->_options['hostname']->getMessages() as $code => $message) {
                $this->_messages[$code] = $message;
            }

            foreach ($this->_options['hostname']->getErrors() as $error) {
                $this->_errors[] = $error;
            }
        } else if ($this->_options['mx']) {
            // MX check on hostname
            $hostname = $this->_validateMXRecords();
        }

        return $hostname;
    }
private function _validateHostnamePart()
    {
        $hostname = $this->_options['hostname']->setTranslator($this->getTranslator())
                         ->isValid($this->_hostname);
        if (!$hostname) {
            $this->_error(self::INVALID_HOSTNAME);

            // Get messages and errors from hostnameValidator
            foreach ($this->_options['hostname']->getMessages() as $code => $message) {
                $this->_messages[$code] = $message;
            }

            foreach ($this->_options['hostname']->getErrors() as $error) {
                $this->_errors[] = $error;
            }
        } else if ($this->_options['mx']) {
            // MX check on hostname
            $hostname = $this->_validateMXRecords();
        }

        return $hostname;
    }
private function _validateHostnamePart ( ) { $ hostname = $ this -> _options [ 'hostname' ] -> setTranslator ( $ this -> getTranslator ( ) ) -> isValid ( $ this -> _hostname ) ; if ( ! $ hostname ) { $ this -> _error ( self :: INVALID_HOSTNAME ) ; // Get messages and errors from hostnameValidator foreach ( $ this -> _options [ 'hostname' ] -> getMessages ( ) as $ code => $ message ) { $ this -> _messages [ $ code ] = $ message ; } foreach ( $ this -> _options [ 'hostname' ] -> getErrors ( ) as $ error ) { $ this -> _errors [ ] = $ error ; } } else if ( $ this -> _options [ 'mx' ] ) { // MX check on hostname $ hostname = $ this -> _validateMXRecords ( ) ; } return $ hostname ; }
Internal method to validate the hostname part of the email address

@return boolean
Internal method to validate the hostname part of the email address