a:10:{s:9:"#provides";s:14:"dojox.rpc.Rest";s:9:"#resource";s:11:"rpc/Rest.js";s:10:"drr._index";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:15:"drr._timeStamps";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:11:"drr._change";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:8:"drr._get";a:2:{s:7:"private";b:1;s:7:"summary";s:0:"";}s:14:"dojox.rpc.Rest";a:6:{s:4:"type";s:8:"Function";s:10:"parameters";a:4:{s:4:"path";a:1:{s:4:"type";s:6:"String";}s:6:"isJson";a:2:{s:8:"optional";b:1;s:4:"type";s:7:"Boolean";}s:6:"schema";a:2:{s:8:"optional";b:1;s:4:"type";s:6:"Object";}s:10:"getRequest";a:2:{s:8:"optional";b:1;s:4:"type";s:8:"Function";}}s:6:"source";s:1630:" var service; // it should be in the form /Table/ path = path.match(/\/$/) ? path : (path + '/'); service = function(id, args){ return drr._get(service, id, args); }; service.isJson = isJson; service._schema = schema; // cache: // This is an object that provides indexing service // This can be overriden to take advantage of more complex referencing/indexing // schemes service.cache = { serialize: isJson ? ((dojox.json && dojox.json.ref) || dojo).toJson : function(result){ return result; } }; // the default XHR args creator: service._getRequest = getRequest || function(id, args){ var request = { url: path + (dojo.isObject(id) ? '?' + dojo.objectToQuery(id) : id == null ? "" : id), handleAs: isJson ? 'json' : 'text', contentType: isJson ? 'application/json' : 'text/plain', sync: dojox.rpc._sync, headers: { Accept: isJson ? 'application/json,application/javascript' : '*/*' } }; if(args && (args.start >= 0 || args.count >= 0)){ request.headers.Range = "items=" + (args.start || '0') + '-' + ((args.count && args.count != Infinity && (args.count + (args.start || 0) - 1)) || ''); } dojox.rpc._sync = false; return request; }; // each calls the event handler function makeRest(name){ service[name] = function(id,content){ return drr._change(name,service,id,content); // the last parameter is to let the OfflineRest know where to store the item }; } makeRest('put'); makeRest('post'); makeRest('delete'); // record the REST services for later lookup service.servicePath = path; return service;";s:7:"summary";s:47:"Creates a REST service using the provided path.";s:7:"returns";s:73:"the last parameter is to let the OfflineRest know where to store the item";s:9:"classlike";b:1;}s:3:"drr";a:2:{s:7:"aliases";s:14:"dojox.rpc.Rest";s:7:"summary";s:0:"";}s:9:"dojox.rpc";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:5:"dojox";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}