src/Message/Parser.php
protected function createReceiveTextMsg(array $data)
    {
        $result = new WxReceiveTextMsg();
        $this->initReceiveMsg($result, $data);
        if (isset($data['Content'])) {
            if (!is_string($data['Content'])) {
                Helper::getLogWriter()->debug("[createReceiveTextMsg]" . serialize($data));
                $data['Content'] = '';
            }
        }

        $result->setContent(isset($data['Content']) ? trim($data['Content']) : '');
        return $result;
    }
protected function createReceiveTextMsg(array $data)
    {
        $result = new WxReceiveTextMsg();
        $this->initReceiveMsg($result, $data);
        if (isset($data['Content'])) {
            if (!is_string($data['Content'])) {
                Helper::getLogWriter()->debug("[createReceiveTextMsg]" . serialize($data));
                $data['Content'] = '';
            }
        }

        $result->setContent(isset($data['Content']) ? trim($data['Content']) : '');
        return $result;
    }
protected function createReceiveTextMsg ( array $ data ) { $ result = new WxReceiveTextMsg ( ) ; $ this -> initReceiveMsg ( $ result , $ data ) ; if ( isset ( $ data [ 'Content' ] ) ) { if ( ! is_string ( $ data [ 'Content' ] ) ) { Helper :: getLogWriter ( ) -> debug ( "[createReceiveTextMsg]" . serialize ( $ data ) ) ; $ data [ 'Content' ] = '' ; } } $ result -> setContent ( isset ( $ data [ 'Content' ] ) ? trim ( $ data [ 'Content' ] ) : '' ) ; return $ result ; }
create text msg

@param array $data
@return WxReceiveTextMsg
create text msg