lib/Ext/direct/Manager.js
function(provider) {
        var me = this,
            args = Ext.toArray(arguments),
            i = 0, ln;

        if (args.length > 1) {
            for (ln = args.length; i < ln; ++i) {
                me.addProvider(args[i]);
            }
            return;
        }

        // if provider has not already been instantiated
        if (!provider.isProvider) {
            provider = Ext.create('direct.' + provider.type + 'provider', provider);
        }
        me.providers.add(provider);
        provider.on('data', me.onProviderData, me);

        if (!provider.isConnected()) {
            provider.connect();
        }

        return provider;
    }
function(provider) {
        var me = this,
            args = Ext.toArray(arguments),
            i = 0, ln;

        if (args.length > 1) {
            for (ln = args.length; i < ln; ++i) {
                me.addProvider(args[i]);
            }
            return;
        }

        // if provider has not already been instantiated
        if (!provider.isProvider) {
            provider = Ext.create('direct.' + provider.type + 'provider', provider);
        }
        me.providers.add(provider);
        provider.on('data', me.onProviderData, me);

        if (!provider.isConnected()) {
            provider.connect();
        }

        return provider;
    }
Adds an Ext.Direct Provider and creates the proxy or stub methods to execute server-side methods. If the provider
is not already connected, it will auto-connect.

Ext.direct.Manager.addProvider({
type: "remoting",       // create a {@link Ext.direct.RemotingProvider}
url: "php/router.php", // url to connect to the Ext.Direct server-side router.
actions: {              // each property within the actions object represents a Class
TestAction: [       // array of methods within each server side Class
{
name: "doEcho", // name of method
len: 1
},{
name: "multiply",
len: 1
},{
name: "doForm",
formHandler: true,  // handle form on server with Ext.Direct.Transaction
len: 1
}]
},
namespace: "myApplication" // namespace to create the Remoting Provider in
});

@param {Ext.direct.Provider/Object...} provider
Accepts any number of Provider descriptions (an instance or config object for
a Provider). Each Provider description instructs Ext.Direct how to create
client-side stub methods.
@return {Object}