设置音乐回复消息
@param string $title 音乐标题
@param string $desc 音乐描述
@param string $musicurl 音乐地址
@param string $hgmusicurl 高清音乐地址
@param string $thumbmediaid 音乐图片缩略图的媒体id（可选）
@return $this
321691
public function music($title, $desc, $musicurl, $hgmusicurl = '', $thumbmediaid = '')
    {
        $this->message = [
            'CreateTime'   => time(),
            'MsgType'      => 'music',
            'ToUserName'   => $this->getOpenid(),
            'FromUserName' => $this->getToOpenid(),
            'Music'        => [
                'Title'       => $title,
                'Description' => $desc,
                'MusicUrl'    => $musicurl,
                'HQMusicUrl'  => $hgmusicurl,
            ],
        ];
        if ($thumbmediaid) {
            $this->message['Music']['ThumbMediaId'] = $thumbmediaid;
        }
        return $this;
    }
1156390
public function addIFrame($src, $windowWidth, $windowHeight, $thumb="", $title = "", $caption="", $width="", $height="")
	{
		$this->addXmlnukeObject(XmlnukeMediaItem::IFrameFactory($src, $windowWidth, $windowHeight, $thumb, $title, $caption, $width, $height));
	}
132727
public long video(List<String> openIds, String mediaId, String title, String desc) {
		return video(new Filter(false, null), openIds, mediaId, title, desc);
	}
824881
public function sendMusic (Type\Music $musicMessage)
    {
        $this->sendReply(
            $this->buildMessage(
                [
                    'MsgType' => $musicMessage->getType(),
                    ucfirst($musicMessage->getType()) => [
                        'Title' => $musicMessage->getTitle(),
                        'Description' => $musicMessage->getDescription(),
                        'MusicUrl' => $musicMessage->getSourceURL(),
                        'HQMusicUrl' => $musicMessage->getHighQualitySourceURL(),
                        'ThumbMediaId' => $musicMessage->getThumbnailID(),
                    ]
                ]
            )
        );
    }
117707
public function getForeverMedia($media_id, $is_video = false)
    {
        if (!$this->access_token && !$this->getAccessToken()) {
            return false;
        }
        $data = array('media_id' => $media_id);
        $result = Tools::httpPost(self::API_URL_PREFIX . self::MEDIA_FOREVER_GET_URL . "access_token={$this->access_token}", Tools::json_encode($data));
        if ($result) {
            if (is_string($result) && ($json = json_decode($result, true))) {
                if (isset($json['errcode'])) {
                    $this->errCode = $json['errcode'];
                    $this->errMsg = $json['errmsg'];
                    return $this->checkRetry(__FUNCTION__, func_get_args());
                }
                return $json;
            }
            return $result;
        }
        return false;
    }
692152
public function hyvesTipUrl($title, $body, $categoryId = 12, $rating = 5) {

        $url = 'http://www.hyves-share.nl/button/tip/?tipcategoryid=%s&rating=%s&title=%s&body=%s';
        $title = $title;
        $body = $body;
        return sprintf($url, $categoryId, $rating, $title, $body);
    }
674512
public function video($mediaid='',$title='',$description='')
	{
		$msg = array(
			'ToUserName' => $this->getRevFrom(),
			'FromUserName'=>$this->getRevTo(),
			'MsgType'=>self::MSGTYPE_IMAGE,
			'Video'=>array(
			        'MediaId'=>$mediaid,
			        'Title'=>$title,
			        'Description'=>$description
			),
			'CreateTime'=>time(),
		);
		$this->Message($msg);
		return $this;
	}
982807
public function writeList(array $list, $titleStyle = 'comment', string $cmdStyle = 'info', string $descStyle = null)
    {
        foreach ($list as $title => $items) {
            // 标题
            $title = "<$titleStyle>$title</$titleStyle>";
            $this->writeln($title);

            // 输出块内容
            $this->writeItems((array)$items, $cmdStyle);
            $this->writeln('');
        }
    }
1251553
public function replyMusic($title, $description, $musicUrl, $hqMusicUrl = '', $thumbMediaId = 0)
    {
        $time = time();
        $hqMusicUrl = $hqMusicUrl == '' ? $musicUrl : $hqMusicUrl;
        $thumbMediaIdXml = empty($thumbMediaId) ? "" : "<ThumbMediaId><![CDATA[{$thumbMediaId}]]></ThumbMediaId>";
        return "
	 	<xml>
		<ToUserName><![CDATA[{$this->_to}]]></ToUserName>
		<FromUserName><![CDATA[{$this->_from}]]></FromUserName>
		<CreateTime>{$time}</CreateTime>
		<MsgType><![CDATA[music]]></MsgType>
		<Music>
		<Title><![CDATA[{$title}]]></Title>
		<Description><![CDATA[{$description}]]></Description>
		<MusicUrl><![CDATA[{$musicUrl}]]></MusicUrl>
		<HQMusicUrl><![CDATA[{$hqMusicUrl}]]></HQMusicUrl>
		{$thumbMediaIdXml}
		</Music>
		</xml>";
    }
217110
public function sendImageByOpenid(array $toUsers, $media_id, $title = "", $description = "")
    {
        $ret = array();
        $ret['touser'] = $toUsers;
        $ret['msgtype'] = 'image';
        $ret['image']['media_id'] = $media_id;
        $ret['image']['title'] = $title;
        $ret['image']['description'] = $description;
        return $this->send($ret);
    }
86135
public function withSimpleCard($title, $content) {
		$this->getResponse()->setCard(new SimpleCard($title, $content));

		return $this;
	}
393018
public function sendSingleActionCardMsg($title, $content, $hideAvatar = 0, $btnOrientation = 0, array $btns=[])
    {
        $query = [
            'msgtype' => 'actionCard',
            'actionCard' => [
                'title' => $title,
                'text' => $content,
                'hideAvatar' => $hideAvatar,
                'btnOrientation' => $btnOrientation,
                'btns' => $btns
            ],
        ];
        return $this->sendMsg($query);
    }
146371
public function sendMiniProgramPage($toUser, $title, $appid, $pagepath, $thumb_media_id)
    {
        $ret = array();
        $ret['touser'] = $toUser;
        $ret['msgtype'] = 'miniprogrampage';
        $ret['miniprogrampage']['title'] = $title;
        $ret['miniprogrampage']['appid'] = $appid;
        $ret['miniprogrampage']['pagepath'] = $pagepath;
        $ret['miniprogrampage']['thumb_media_id'] = $thumb_media_id;
        return $this->send($ret);
    }
35650
public function sendActionCardMsg($title, $content, $singleURL, $hideAvatar = 0, $btnOrientation = 0, $singleTitle = '阅读原文')
    {
        $query = [
            'msgtype' => 'actionCard',
            'actionCard' => [
                'title' => $title,
                'text' => $content,
                'hideAvatar' => $hideAvatar,
                'btnOrientation' => $btnOrientation,
                'singleTitle' => $singleTitle,
                'singleURL' => $singleURL
            ],
        ];
        return $this->sendMsg($query);
    }
704349
public static function create(
        UUID $id,
        MIMEType $mimeType,
        StringLiteral $description,
        StringLiteral $copyrightHolder,
        Url $sourceLocation,
        Language $language
    ) {
        $mediaObject = new self();
        $mediaObject->apply(
            new MediaObjectCreated(
                $id,
                $mimeType,
                $description,
                $copyrightHolder,
                $sourceLocation,
                $language
            )
        );

        return $mediaObject;
    }
796685
public function withStandardCard($title, $text, $smallImageUrl, $largeImageUrl) {
		$this->getResponse()->setCard(new StandardCard($title, $text, $smallImageUrl, $largeImageUrl));

		return $this;
	}
1000967
public function uploadVideo($mediaId, $title, $description)
    {
        $result = $this->httpRaw(self::WECHAT_MEDIA_VIDEO_UPLOAD_URL . 'access_token=' . $this->getAccessToken(), [
            'media_id' => $mediaId,
            'title' => $title,
            'description' => $description
        ]);
        return isset($result['media_id']) ? $result : false;
    }