original_string: protected function sendMusicMsgToXmlString(WxSendMusicMsg $msg)
      {
          $formatStr = <<<XML
  <xml>
  <ToUserName><![CDATA[%s]]></ToUserName>
  <FromUserName><![CDATA[%s]]></FromUserName>
  <CreateTime>%d</CreateTime>
  <MsgType><![CDATA[%s]]></MsgType>
  <Music>
  <Title><![CDATA[%s]]></Title>
  <Description><![CDATA[%s]]></Description>
  <MusicUrl><![CDATA[%s]]></MusicUrl>
  <HQMusicUrl><![CDATA[%s]]></HQMusicUrl>
  <ThumbMediaId><![CDATA[%s]]></ThumbMediaId>
  </Music>
  </xml>
  XML;
          $result = sprintf($formatStr,   $msg->getToUserName(),
                                          $msg->getFromUserName(),
                                          strtotime($msg->getCreateTime()),
                                          $msg->getMsgType(),
                                          $msg->getTitle(),
                                          $msg->getDescription(),
                                          $msg->getMusicUrl(),
                                          $msg->getHQMusicUrl(),
                                          $msg->getThumbMediaId()
                                      );
  
          return $result;
      }
code: protected function sendMusicMsgToXmlString(WxSendMusicMsg $msg)
      {
          $formatStr = <<<XML
  <xml>
  <ToUserName><![CDATA[%s]]></ToUserName>
  <FromUserName><![CDATA[%s]]></FromUserName>
  <CreateTime>%d</CreateTime>
  <MsgType><![CDATA[%s]]></MsgType>
  <Music>
  <Title><![CDATA[%s]]></Title>
  <Description><![CDATA[%s]]></Description>
  <MusicUrl><![CDATA[%s]]></MusicUrl>
  <HQMusicUrl><![CDATA[%s]]></HQMusicUrl>
  <ThumbMediaId><![CDATA[%s]]></ThumbMediaId>
  </Music>
  </xml>
  XML;
          $result = sprintf($formatStr,   $msg->getToUserName(),
                                          $msg->getFromUserName(),
                                          strtotime($msg->getCreateTime()),
                                          $msg->getMsgType(),
                                          $msg->getTitle(),
                                          $msg->getDescription(),
                                          $msg->getMusicUrl(),
                                          $msg->getHQMusicUrl(),
                                          $msg->getThumbMediaId()
                                      );
  
          return $result;
      }
code_tokens: protected function sendMusicMsgToXmlString ( WxSendMusicMsg $ msg ) { $ formatStr =  <<<XML
  <xml>
  <ToUserName><![CDATA[%s]]></ToUserName>
  <FromUserName><![CDATA[%s]]></FromUserName>
  <CreateTime>%d</CreateTime>
  <MsgType><![CDATA[%s]]></MsgType>
  <Music>
  <Title><![CDATA[%s]]></Title>
  <Description><![CDATA[%s]]></Description>
  <MusicUrl><![CDATA[%s]]></MusicUrl>
  <HQMusicUrl><![CDATA[%s]]></HQMusicUrl>
  <ThumbMediaId><![CDATA[%s]]></ThumbMediaId>
  </Music>
  </xml>
  XML ; $ result = sprintf ( $ formatStr , $ msg -> getToUserName ( ) , $ msg -> getFromUserName ( ) , strtotime ( $ msg -> getCreateTime ( ) ) , $ msg -> getMsgType ( ) , $ msg -> getTitle ( ) , $ msg -> getDescription ( ) , $ msg -> getMusicUrl ( ) , $ msg -> getHQMusicUrl ( ) , $ msg -> getThumbMediaId ( ) ) ; return $ result ; }
docstring: formatter WxSendMusicMsg to xml string
  @param WxSendMusicMsg $msg
  @return string
docstring_tokens: formatter WxSendMusicMsg to xml string