original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Internal method to validate the hostname part of the email address
  
  @return boolean
docstring_tokens: Internal method to validate the hostname part of the email address