protected function sendVideoMsgToXmlString(WxSendVideoMsg $msg)
    {
        $formatStr = <<<XML
<xml>
<ToUserName><![CDATA[%s]]></ToUserName>
<FromUserName><![CDATA[%s]]></FromUserName>
<CreateTime>%d</CreateTime>
<MsgType><![CDATA[%s]]></MsgType>
<Video>
<MediaId><![CDATA[%s]]></MediaId>
<Title><![CDATA[%s]]></Title>
<Description><![CDATA[%s]]></Description>
</Video>
</xml>
XML;
        $result = sprintf($formatStr,   $msg->getToUserName(),
                                        $msg->getFromUserName(),
                                        strtotime($msg->getCreateTime()),
                                        $msg->getMsgType(),
                                        $msg->getMediaId(),
                                        $msg->getTitle(),
                                        $msg->getDescription()
                        );

        return $result;
    }
protected function sendVideoMsgToXmlString(WxSendVideoMsg $msg)
    {
        $formatStr = <<<XML
<xml>
<ToUserName><![CDATA[%s]]></ToUserName>
<FromUserName><![CDATA[%s]]></FromUserName>
<CreateTime>%d</CreateTime>
<MsgType><![CDATA[%s]]></MsgType>
<Video>
<MediaId><![CDATA[%s]]></MediaId>
<Title><![CDATA[%s]]></Title>
<Description><![CDATA[%s]]></Description>
</Video>
</xml>
XML;
        $result = sprintf($formatStr,   $msg->getToUserName(),
                                        $msg->getFromUserName(),
                                        strtotime($msg->getCreateTime()),
                                        $msg->getMsgType(),
                                        $msg->getMediaId(),
                                        $msg->getTitle(),
                                        $msg->getDescription()
                        );

        return $result;
    }
protected function sendVideoMsgToXmlString ( WxSendVideoMsg $ msg ) { $ formatStr =  <<<XML
<xml>
<ToUserName><![CDATA[%s]]></ToUserName>
<FromUserName><![CDATA[%s]]></FromUserName>
<CreateTime>%d</CreateTime>
<MsgType><![CDATA[%s]]></MsgType>
<Video>
<MediaId><![CDATA[%s]]></MediaId>
<Title><![CDATA[%s]]></Title>
<Description><![CDATA[%s]]></Description>
</Video>
</xml>
XML ; $ result = sprintf ( $ formatStr , $ msg -> getToUserName ( ) , $ msg -> getFromUserName ( ) , strtotime ( $ msg -> getCreateTime ( ) ) , $ msg -> getMsgType ( ) , $ msg -> getMediaId ( ) , $ msg -> getTitle ( ) , $ msg -> getDescription ( ) ) ; return $ result ; }
formatter WxSendVideoMsg to xml string
@param WxSendVideoMsg $msg
@return string
formatter WxSendVideoMsg to xml string