2 * Small utility class used internally to represent a Direct method.
3 * Thi class is used internally.
4 * @class Ext.direct.RemotingMethod
7 Ext.define('Ext.direct.RemotingMethod', {
9 constructor: function(config){
11 params = Ext.isDefined(config.params) ? config.params : config.len,
14 me.name = config.name;
15 me.formHandler = config.formHandler;
16 if (Ext.isNumber(params)) {
17 // given only the number of parameters
22 * Given an array of either
24 * b) Objects with a name property. We may want to encode extra info in here later
27 Ext.each(params, function(param){
28 name = Ext.isObject(param) ? param.name : param;
35 * Takes the arguments for the Direct function and splits the arguments
36 * from the scope and the callback.
37 * @param {Array} args The arguments passed to the direct call
38 * @return {Object} An object with 3 properties, args, callback & scope.
40 getCallData: function(args){
51 scope = args[len + 1];
53 data = args.slice(0, len);
56 data = Ext.apply({}, args[0]);
60 // filter out any non-existent properties
62 if (data.hasOwnProperty(name)) {
63 if (!Ext.Array.contains(params, name)) {