js/PluginMatcher.js
function (serviceName, methodName, factoryPlugins, servicePlugins, invokePlugins) {

            var ret = util.mixin({}, this.defaults), that = this;

            Object.keys(ret).forEach(function (key) {
                var pf = that.list(serviceName, methodName, key, factoryPlugins),
                    ps = that.list(serviceName, methodName, key, servicePlugins),
                    pi = that.list(serviceName, methodName, key, invokePlugins);
                ret[key] = [].concat((pf || []), (ps || []), (pi || []));
            });

            return ret;
        }
function (serviceName, methodName, factoryPlugins, servicePlugins, invokePlugins) {

            var ret = util.mixin({}, this.defaults), that = this;

            Object.keys(ret).forEach(function (key) {
                var pf = that.list(serviceName, methodName, key, factoryPlugins),
                    ps = that.list(serviceName, methodName, key, servicePlugins),
                    pi = that.list(serviceName, methodName, key, invokePlugins);
                ret[key] = [].concat((pf || []), (ps || []), (pi || []));
            });

            return ret;
        }
function ( serviceName , methodName , factoryPlugins , servicePlugins , invokePlugins ) { var ret = util . mixin ( { } , this . defaults ) , that = this ; Object . keys ( ret ) . forEach ( function ( key ) { var pf = that . list ( serviceName , methodName , key , factoryPlugins ) , ps = that . list ( serviceName , methodName , key , servicePlugins ) , pi = that . list ( serviceName , methodName , key , invokePlugins ) ; ret [ key ] = [ ] . concat ( ( pf || [ ] ) , ( ps || [ ] ) , ( pi || [ ] ) ) ; } ) ; return ret ; }
Construct an object containing the arrays of plugins for each phase with precedence and
execution order resolved.

@param {String} serviceName the name of the service to match against.
@param {String} methodName - the name of the method on the service to match against.
@param {Array of circuits.Plugin} factoryPlugins the array of plugins at the factory level.
@param {Array of circuits.Plugin} servicePlugins the array of plugins at the service level.
@param {Array of circuits.Plugin} invokePlugins the array of plugins at the method invocation level.

@return {Object} an object containing an array of plugins for each phase of the service request.
Construct an object containing the arrays of plugins for each phase with precedence and execution order resolved .