lib/factories/internal.object.factory.js
function loadAdapters() {
        var adapters = {};
        var adaptersDir = path.join(this.injector.rootDir, this.injector.servicesDir + '/adapters');

        if (!fs.existsSync(adaptersDir)) {
            return this.injector.adapters || {};
        }

        var me = this;
        var adapterNames = fs.readdirSync(adaptersDir);

        _.each(adapterNames, function (adapterName) {
            if (adapterName.substring(adapterName.length - 3) !== '.js') {  // only dirs, not js files
                var adapterImpl = me.injector.adapterMap[adapterName];
                adapterName = utils.getPascalCase(adapterImpl + '.' + adapterName + '.adapter');
                adapters[adapterName] = me.injector.loadModule(adapterName);
            }
        });

        // add the adapters that come from plugins to the list
        _.extend(adapters, this.injector.adapters);

        // return the adapters
        return adapters;
    }
function loadAdapters() {
        var adapters = {};
        var adaptersDir = path.join(this.injector.rootDir, this.injector.servicesDir + '/adapters');

        if (!fs.existsSync(adaptersDir)) {
            return this.injector.adapters || {};
        }

        var me = this;
        var adapterNames = fs.readdirSync(adaptersDir);

        _.each(adapterNames, function (adapterName) {
            if (adapterName.substring(adapterName.length - 3) !== '.js') {  // only dirs, not js files
                var adapterImpl = me.injector.adapterMap[adapterName];
                adapterName = utils.getPascalCase(adapterImpl + '.' + adapterName + '.adapter');
                adapters[adapterName] = me.injector.loadModule(adapterName);
            }
        });

        // add the adapters that come from plugins to the list
        _.extend(adapters, this.injector.adapters);

        // return the adapters
        return adapters;
    }
function loadAdapters ( ) { var adapters = { } ; var adaptersDir = path . join ( this . injector . rootDir , this . injector . servicesDir + '/adapters' ) ; if ( ! fs . existsSync ( adaptersDir ) ) { return this . injector . adapters || { } ; } var me = this ; var adapterNames = fs . readdirSync ( adaptersDir ) ; _ . each ( adapterNames , function ( adapterName ) { if ( adapterName . substring ( adapterName . length - 3 ) !== '.js' ) { // only dirs, not js files var adapterImpl = me . injector . adapterMap [ adapterName ] ; adapterName = utils . getPascalCase ( adapterImpl + '.' + adapterName + '.adapter' ) ; adapters [ adapterName ] = me . injector . loadModule ( adapterName ) ; } } ) ; // add the adapters that come from plugins to the list _ . extend ( adapters , this . injector . adapters ) ; // return the adapters return adapters ; }
Load all adapters into an object that can be injected
@returns {{}}
Load all adapters into an object that can be injected