value: function setContainer()

in lib/Bootstrapper.js [161:183]


		value: function setContainer(container) {
			var _this2 = this;

			var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

			if (this.__container__ !== null) {
				_Logger2.default.error('RHW02', 'A container is already set. ' + 'Please call dispose() before assigning a new one.');
				return;
			}

			if (!container.factory || typeof container.factory.inject !== 'function' || typeof container.factory.dispose !== 'function') {
				_Logger2.default.error('RHE10', 'Incompatible factory');
				return;
			}

			// Set the container
			this.__container__ = container;

			// Wire up the components from the container
			this.update(null, function () {
				_callback(cb, _this2);
			});
		}