lib/dependency.injector.js
function DependencyInjector(opts) {
    var rootDefault = p.join(__dirname, '../../..');
    this.rootDir = opts.rootDir || rootDefault;                 // project base dir (default is a guess)
    this.require = opts.require || require;                     // we need require from the project
    this.container = opts.container || 'api';                   // resource has diff profiles for diff containers
    this.servicesDir = opts.servicesDir || 'services';          // dir where services reside
    this.tplDir = opts.tplDir || 'dist/tpls';                   // precompiled templates
    this.debug = opts.debug || false;                           // debug mode will have us firing more events
    this.debugPattern = opts.debugPattern;                      // by default if debug on, we view EVERYTHING
    this.debugHandler = opts.debugHandler;                      // function used when debug event occurs
    this.adapters = opts.adapters || {};                        // if client uses plugins, they will pass in adapters
    this.reactors = opts.reactors || {};                        // if client uses plugins, they will pass in reactors
    this.adapterMap = this.loadAdapterMap(opts);                // mappings from adapter type to impl
    this.aliases = this.loadAliases(opts);                      // mapping of names to locations
    this.factories = this.loadFactories(opts);                  // load all the factories
}
function DependencyInjector(opts) {
    var rootDefault = p.join(__dirname, '../../..');
    this.rootDir = opts.rootDir || rootDefault;                 // project base dir (default is a guess)
    this.require = opts.require || require;                     // we need require from the project
    this.container = opts.container || 'api';                   // resource has diff profiles for diff containers
    this.servicesDir = opts.servicesDir || 'services';          // dir where services reside
    this.tplDir = opts.tplDir || 'dist/tpls';                   // precompiled templates
    this.debug = opts.debug || false;                           // debug mode will have us firing more events
    this.debugPattern = opts.debugPattern;                      // by default if debug on, we view EVERYTHING
    this.debugHandler = opts.debugHandler;                      // function used when debug event occurs
    this.adapters = opts.adapters || {};                        // if client uses plugins, they will pass in adapters
    this.reactors = opts.reactors || {};                        // if client uses plugins, they will pass in reactors
    this.adapterMap = this.loadAdapterMap(opts);                // mappings from adapter type to impl
    this.aliases = this.loadAliases(opts);                      // mapping of names to locations
    this.factories = this.loadFactories(opts);                  // load all the factories
}
function DependencyInjector ( opts ) { var rootDefault = p . join ( __dirname , '../../..' ) ; this . rootDir = opts . rootDir || rootDefault ; // project base dir (default is a guess) this . require = opts . require || require ; // we need require from the project this . container = opts . container || 'api' ; // resource has diff profiles for diff containers this . servicesDir = opts . servicesDir || 'services' ; // dir where services reside this . tplDir = opts . tplDir || 'dist/tpls' ; // precompiled templates this . debug = opts . debug || false ; // debug mode will have us firing more events this . debugPattern = opts . debugPattern ; // by default if debug on, we view EVERYTHING this . debugHandler = opts . debugHandler ; // function used when debug event occurs this . adapters = opts . adapters || { } ; // if client uses plugins, they will pass in adapters this . reactors = opts . reactors || { } ; // if client uses plugins, they will pass in reactors this . adapterMap = this . loadAdapterMap ( opts ) ; // mappings from adapter type to impl this . aliases = this . loadAliases ( opts ) ; // mapping of names to locations this . factories = this . loadFactories ( opts ) ; // load all the factories }
Initialize the injector with input options
@param opts
@constructor
Initialize the injector with input options