protected function buildReply($to, $from, $message)
    {
        $base = [
            'ToUserName'   => $to,
            'FromUserName' => $from,
            'CreateTime'   => time(),
            'MsgType'      => is_array($message) ? current($message)->getType() : $message->getType(),
        ];

        $transformer = new Transformer();

        return XML::build(array_merge($base, $transformer->transform($message)));
    }
protected function buildReply($to, $from, $message)
    {
        $base = [
            'ToUserName'   => $to,
            'FromUserName' => $from,
            'CreateTime'   => time(),
            'MsgType'      => is_array($message) ? current($message)->getType() : $message->getType(),
        ];

        $transformer = new Transformer();

        return XML::build(array_merge($base, $transformer->transform($message)));
    }
protected function buildReply ( $ to , $ from , $ message ) { $ base = [ 'ToUserName' => $ to , 'FromUserName' => $ from , 'CreateTime' => time ( ) , 'MsgType' => is_array ( $ message ) ? current ( $ message ) -> getType ( ) : $ message -> getType ( ) , ] ; $ transformer = new Transformer ( ) ; return XML :: build ( array_merge ( $ base , $ transformer -> transform ( $ message ) ) ) ; }
Build reply XML.

@param string          $to
@param string          $from
@param AbstractMessage $message

@return string
Build reply XML .