protected function renderV2()
    {
        if ('google' == $this->requestSource) {
            $out = [
                'suggestions' => [
                    'suggestions' => [],
                ],
            ];

            foreach ($this->replies as $i => $reply) {
                $out['suggestions']['suggestions'][$i]['title'] = $reply;
            }

            $out['platform'] = $this->v2PlatformMap[$this->requestSource];

            return $out;
        } else {
            $out = [
                'quickReplies' => [
                    'quickReplies' => $this->replies,
                ],
            ];

            $out['platform'] = $this->v2PlatformMap[$this->requestSource];

            return $out;
        }
    }
protected function renderV2()
    {
        if ('google' == $this->requestSource) {
            $out = [
                'suggestions' => [
                    'suggestions' => [],
                ],
            ];

            foreach ($this->replies as $i => $reply) {
                $out['suggestions']['suggestions'][$i]['title'] = $reply;
            }

            $out['platform'] = $this->v2PlatformMap[$this->requestSource];

            return $out;
        } else {
            $out = [
                'quickReplies' => [
                    'quickReplies' => $this->replies,
                ],
            ];

            $out['platform'] = $this->v2PlatformMap[$this->requestSource];

            return $out;
        }
    }
protected function renderV2 ( ) { if ( 'google' == $ this -> requestSource ) { $ out = [ 'suggestions' => [ 'suggestions' => [ ] , ] , ] ; foreach ( $ this -> replies as $ i => $ reply ) { $ out [ 'suggestions' ] [ 'suggestions' ] [ $ i ] [ 'title' ] = $ reply ; } $ out [ 'platform' ] = $ this -> v2PlatformMap [ $ this -> requestSource ] ; return $ out ; } else { $ out = [ 'quickReplies' => [ 'quickReplies' => $ this -> replies , ] , ] ; $ out [ 'platform' ] = $ this -> v2PlatformMap [ $ this -> requestSource ] ; return $ out ; } }
Render response as array for API V2.

@return array
Render response as array for API V2 .