Class mxn.Invoker
Defined in: mxn.js.
Constructor Attributes | Constructor Name and Description |
---|---|
mxn.Invoker(aobj, asClassName, afnApiIdGetter)
Creates a new Invoker, a class which helps with on-the-fly invocation of the correct API methods.
|
Method Attributes | Method Name and Description |
---|---|
go(sMethodName, args, oOptions)
Invoke the API implementation of a specific method.
|
Class Detail
mxn.Invoker(aobj, asClassName, afnApiIdGetter)
Creates a new Invoker, a class which helps with on-the-fly invocation of the correct API methods.
- Parameters:
- {Object} aobj
- The core object whose methods will make cals to go()
- {String} asClassName
- The name of the Mapstraction class to be invoked, normally the same name as aobj's constructor function
- {Function} afnApiIdGetter
- The function on object aobj which will return the active API ID
Method Detail
go(sMethodName, args, oOptions)
Invoke the API implementation of a specific method.
- Parameters:
- {String} sMethodName
- The method name to invoke
- {Array} args
- Arguments to pass on
- {Object} oOptions
- Optional. Extra options for invocation
- {Boolean} oOptions.overrideApi
- When true the first argument is used as the API ID.
- {Object} oOptions.context
- A context object for passing extra information on to the provider implementation.
- {Function} oOptions.fallback
- A fallback function to run if the provider implementation is missing.