application/modules/g/controllers/ExtController.php
protected function _modifyAfterFetch($response, $request) {
        if (!$this->_methodFailed($response)) {
            $rows = $response['result'];
            $methodParts = explode('.', $request['method']);
            $modelClass  = Garp_Content_Api::modelAliasToClass(array_shift($methodParts));

            $params = $request['params'];
            $params = !empty($params) ? $params[0] : array();
            $response['result'] = array(
                'rows' => $rows,
                'total' => $this->_fetchTotal($modelClass, $params)
            );
        }
        return $response;
    }
protected function _modifyAfterFetch($response, $request) {
        if (!$this->_methodFailed($response)) {
            $rows = $response['result'];
            $methodParts = explode('.', $request['method']);
            $modelClass  = Garp_Content_Api::modelAliasToClass(array_shift($methodParts));

            $params = $request['params'];
            $params = !empty($params) ? $params[0] : array();
            $response['result'] = array(
                'rows' => $rows,
                'total' => $this->_fetchTotal($modelClass, $params)
            );
        }
        return $response;
    }
protected function _modifyAfterFetch ( $ response , $ request ) { if ( ! $ this -> _methodFailed ( $ response ) ) { $ rows = $ response [ 'result' ] ; $ methodParts = explode ( '.' , $ request [ 'method' ] ) ; $ modelClass = Garp_Content_Api :: modelAliasToClass ( array_shift ( $ methodParts ) ) ; $ params = $ request [ 'params' ] ; $ params = ! empty ( $ params ) ? $ params [ 0 ] : array ( ) ; $ response [ 'result' ] = array ( 'rows' => $ rows , 'total' => $ this -> _fetchTotal ( $ modelClass , $ params ) ) ; } return $ response ; }
Modify results after fetch

@param Array $response The original response
@param Array $request The original request
@return String
Modify results after fetch