protected function sendMusicMsgToJsonString(WxSendMusicMsg $msg)
    {
        $formatStr = '{
                        "touser":"%s",
                        "msgtype":"%s",
                        "music":
                        {
                          "title":"%s",
                          "description":"%s",
                          "musicurl":"%s",
                          "hqmusicurl":"%s",
                          "thumb_media_id":"%s"
                        }
                    }';
        $result = sprintf($formatStr,   $msg->getToUserName(),
                                        $msg->getMsgType(),
                                        $msg->getTitle(),
                                        $msg->getDescription(),
                                        $msg->getMusicUrl(),
                                        $msg->getHQMusicUrl(),
                                        $msg->getThumbMediaId()
                            );

        return $result;
    }
protected function sendMusicMsgToJsonString(WxSendMusicMsg $msg)
    {
        $formatStr = '{
                        "touser":"%s",
                        "msgtype":"%s",
                        "music":
                        {
                          "title":"%s",
                          "description":"%s",
                          "musicurl":"%s",
                          "hqmusicurl":"%s",
                          "thumb_media_id":"%s"
                        }
                    }';
        $result = sprintf($formatStr,   $msg->getToUserName(),
                                        $msg->getMsgType(),
                                        $msg->getTitle(),
                                        $msg->getDescription(),
                                        $msg->getMusicUrl(),
                                        $msg->getHQMusicUrl(),
                                        $msg->getThumbMediaId()
                            );

        return $result;
    }
protected function sendMusicMsgToJsonString ( WxSendMusicMsg $ msg ) { $ formatStr = '{
                        "touser":"%s",
                        "msgtype":"%s",
                        "music":
                        {
                          "title":"%s",
                          "description":"%s",
                          "musicurl":"%s",
                          "hqmusicurl":"%s",
                          "thumb_media_id":"%s"
                        }
                    }' ; $ result = sprintf ( $ formatStr , $ msg -> getToUserName ( ) , $ msg -> getMsgType ( ) , $ msg -> getTitle ( ) , $ msg -> getDescription ( ) , $ msg -> getMusicUrl ( ) , $ msg -> getHQMusicUrl ( ) , $ msg -> getThumbMediaId ( ) ) ; return $ result ; }
formatter WxSendMusicMsg to Json string
@param WxSendMusicMsg $msg
@return string
formatter WxSendMusicMsg to Json string