lib/packages/core-classes.js
function(name) {

		if (!(name in this._modules)) {

			var config = Lava.schema.modules[name],
				className = config.type || Lava.schema.data.DEFAULT_MODULE_CLASS,
				constructor = Lava.ClassManager.getConstructor(className, 'Lava.data');

			// construction is split into two phases, cause initFields() may reference other modules
			// - this will result in recursive call to getModule().
			// In case of circular dependency, the first module must be already constructed.
			this._modules[name] = new constructor(this, config, name);
			this._modules[name].initFields();

		}

		return this._modules[name];

	}
function(name) {

		if (!(name in this._modules)) {

			var config = Lava.schema.modules[name],
				className = config.type || Lava.schema.data.DEFAULT_MODULE_CLASS,
				constructor = Lava.ClassManager.getConstructor(className, 'Lava.data');

			// construction is split into two phases, cause initFields() may reference other modules
			// - this will result in recursive call to getModule().
			// In case of circular dependency, the first module must be already constructed.
			this._modules[name] = new constructor(this, config, name);
			this._modules[name].initFields();

		}

		return this._modules[name];

	}
function ( name ) { if ( ! ( name in this . _modules ) ) { var config = Lava . schema . modules [ name ] , className = config . type || Lava . schema . data . DEFAULT_MODULE_CLASS , constructor = Lava . ClassManager . getConstructor ( className , 'Lava.data' ) ; // construction is split into two phases, cause initFields() may reference other modules // - this will result in recursive call to getModule(). // In case of circular dependency, the first module must be already constructed. this . _modules [ name ] = new constructor ( this , config , name ) ; this . _modules [ name ] . initFields ( ) ; } return this . _modules [ name ] ; }
Get a global named module instance
@param {string} name Module name
@returns {Lava.data.Module}
Get a global named module instance