protected function _addQueryLogsNode($json)
    {
        $listener = $this->_getApiQueryLogListenerObject();
        $logs = $listener->getQueryLogs();

        if (empty($logs)) {
            return $json;
        }

        $result = json_decode($json, true);
        $result['query'] = $logs;

        return json_encode($result, JSON_PRETTY_PRINT);
    }
protected function _addQueryLogsNode($json)
    {
        $listener = $this->_getApiQueryLogListenerObject();
        $logs = $listener->getQueryLogs();

        if (empty($logs)) {
            return $json;
        }

        $result = json_decode($json, true);
        $result['query'] = $logs;

        return json_encode($result, JSON_PRETTY_PRINT);
    }
protected function _addQueryLogsNode ( $ json ) { $ listener = $ this -> _getApiQueryLogListenerObject ( ) ; $ logs = $ listener -> getQueryLogs ( ) ; if ( empty ( $ logs ) ) { return $ json ; } $ result = json_decode ( $ json , true ) ; $ result [ 'query' ] = $ logs ; return json_encode ( $ result , JSON_PRETTY_PRINT ) ; }
Add top-level `query` node if ApiQueryLogListener is loaded.

@param string $json Json encoded string
@return string Json encoded string
Add top - level query node if ApiQueryLogListener is loaded .