original_string: function getHTTPBody($soapmsg) {
  		if (count($this->responseAttachments) > 0) {
  			$params['content_type'] = 'multipart/related; type="text/xml"';
  			$mimeMessage = new Mail_mimePart('', $params);
  			unset($params);
  
  			$params['content_type'] = 'text/xml';
  			$params['encoding']     = '8bit';
  			$params['charset']      = $this->soap_defencoding;
  			$mimeMessage->addSubpart($soapmsg, $params);
  			
  			foreach ($this->responseAttachments as $att) {
  				unset($params);
  
  				$params['content_type'] = $att['contenttype'];
  				$params['encoding']     = 'base64';
  				$params['disposition']  = 'attachment';
  				$params['dfilename']    = $att['filename'];
  				$params['cid']          = $att['cid'];
  
  				if ($att['data'] == '' && $att['filename'] <> '') {
  					if ($fd = fopen($att['filename'], 'rb')) {
  						$data = fread($fd, filesize($att['filename']));
  						fclose($fd);
  					} else {
  						$data = '';
  					}
  					$mimeMessage->addSubpart($data, $params);
  				} else {
  					$mimeMessage->addSubpart($att['data'], $params);
  				}
  			}
  
  			$output = $mimeMessage->encode();
  			$mimeHeaders = $output['headers'];
  	
  			foreach ($mimeHeaders as $k => $v) {
  				$this->debug("MIME header $k: $v");
  				if (strtolower($k) == 'content-type') {
  					// PHP header() seems to strip leading whitespace starting
  					// the second line, so force everything to one line
  					$this->mimeContentType = str_replace("\r\n", " ", $v);
  				}
  			}
  	
  			return $output['body'];
  		}
  
  		return parent::getHTTPBody($soapmsg);
  	}
code: function getHTTPBody($soapmsg) {
  		if (count($this->responseAttachments) > 0) {
  			$params['content_type'] = 'multipart/related; type="text/xml"';
  			$mimeMessage = new Mail_mimePart('', $params);
  			unset($params);
  
  			$params['content_type'] = 'text/xml';
  			$params['encoding']     = '8bit';
  			$params['charset']      = $this->soap_defencoding;
  			$mimeMessage->addSubpart($soapmsg, $params);
  			
  			foreach ($this->responseAttachments as $att) {
  				unset($params);
  
  				$params['content_type'] = $att['contenttype'];
  				$params['encoding']     = 'base64';
  				$params['disposition']  = 'attachment';
  				$params['dfilename']    = $att['filename'];
  				$params['cid']          = $att['cid'];
  
  				if ($att['data'] == '' && $att['filename'] <> '') {
  					if ($fd = fopen($att['filename'], 'rb')) {
  						$data = fread($fd, filesize($att['filename']));
  						fclose($fd);
  					} else {
  						$data = '';
  					}
  					$mimeMessage->addSubpart($data, $params);
  				} else {
  					$mimeMessage->addSubpart($att['data'], $params);
  				}
  			}
  
  			$output = $mimeMessage->encode();
  			$mimeHeaders = $output['headers'];
  	
  			foreach ($mimeHeaders as $k => $v) {
  				$this->debug("MIME header $k: $v");
  				if (strtolower($k) == 'content-type') {
  					// PHP header() seems to strip leading whitespace starting
  					// the second line, so force everything to one line
  					$this->mimeContentType = str_replace("\r\n", " ", $v);
  				}
  			}
  	
  			return $output['body'];
  		}
  
  		return parent::getHTTPBody($soapmsg);
  	}
code_tokens: function getHTTPBody ( $ soapmsg ) { if ( count ( $ this -> responseAttachments ) > 0 ) { $ params [ 'content_type' ] = 'multipart/related; type="text/xml"' ; $ mimeMessage = new Mail_mimePart ( '' , $ params ) ; unset ( $ params ) ; $ params [ 'content_type' ] = 'text/xml' ; $ params [ 'encoding' ] = '8bit' ; $ params [ 'charset' ] = $ this -> soap_defencoding ; $ mimeMessage -> addSubpart ( $ soapmsg , $ params ) ; foreach ( $ this -> responseAttachments as $ att ) { unset ( $ params ) ; $ params [ 'content_type' ] = $ att [ 'contenttype' ] ; $ params [ 'encoding' ] = 'base64' ; $ params [ 'disposition' ] = 'attachment' ; $ params [ 'dfilename' ] = $ att [ 'filename' ] ; $ params [ 'cid' ] = $ att [ 'cid' ] ; if ( $ att [ 'data' ] == '' && $ att [ 'filename' ] <> '' ) { if ( $ fd = fopen ( $ att [ 'filename' ] , 'rb' ) ) { $ data = fread ( $ fd , filesize ( $ att [ 'filename' ] ) ) ; fclose ( $ fd ) ; } else { $ data = '' ; } $ mimeMessage -> addSubpart ( $ data , $ params ) ; } else { $ mimeMessage -> addSubpart ( $ att [ 'data' ] , $ params ) ; } } $ output = $ mimeMessage -> encode ( ) ; $ mimeHeaders = $ output [ 'headers' ] ; foreach ( $ mimeHeaders as $ k => $ v ) { $ this -> debug ( "MIME header $k: $v" ) ; if ( strtolower ( $ k ) == 'content-type' ) { // PHP header() seems to strip leading whitespace starting
   // the second line, so force everything to one line
   $ this -> mimeContentType = str_replace ( "\r\n" , " " , $ v ) ; } } return $ output [ 'body' ] ; } return parent :: getHTTPBody ( $ soapmsg ) ; }
docstring: gets the HTTP body for the current response.
  
  @param string $soapmsg The SOAP payload
  @return string The HTTP body, which includes the SOAP payload
  @access private
docstring_tokens: gets the HTTP body for the current response .