Loads the type descriptor.

@param Module $containingModule The module that contains the type
descriptor.

@throws AlreadyLoadedException If the descriptor is already loaded.
179529
public function load(Module $containingModule)
    {
        if (null !== $this->state) {
            throw new AlreadyLoadedException('The type descriptor is already loaded.');
        }

        $this->containingModule = $containingModule;
        $this->state = BindingTypeState::ENABLED;
    }
1348849
public function _initialize()
    {
        try {
            $this->driver = new RedisDriver([
                'host'     => $this->config['host'],
                'port'     => $this->config['port'],
                'database' => $this->config['database']
            ]);
        } catch (\Exception $e) {
            throw new ModuleException(
                __CLASS__,
                $e->getMessage()
            );
        }
    }
991476
public function loadModuleData()
    {
        $moduleData = $GLOBALS['BE_USER']->getModuleData(self::KEY);

        $this->unsetModuleDataIfCanNotBeSerialized($moduleData);
        if (empty($moduleData) || !$moduleData) {
            $moduleData = GeneralUtility::makeInstance(ModuleData::class);
        } else {
            $moduleData = unserialize($moduleData);
        }

        return $moduleData;
    }
1271701
@Override
    public void initModule() throws ModuleInitializationException {
        Map<String, String> parameters = getParameters();
        copyPropertiesOverParameters(parameters);
        serverInterface = new ServerWrapper(getServer());
        logger.info("Journaling parameters: " + parameters);
        parseParameters(parameters);

        if (inRecoveryMode) {
            worker =
                    new JournalConsumer(parameters, getRole(), serverInterface);
        } else {
            worker = new JournalCreator(parameters, getRole(), serverInterface);
        }
        logger.info("Journal worker module is: " + worker.toString());
    }
462693
@Override
    public void initModule() throws ModuleInitializationException {
        // pidNamespace (required, 1-17 chars, a-z, A-Z, 0-9 '-' '.')
        m_pidNamespace = getParameter("pidNamespace");
        if (m_pidNamespace == null) {
            throw new ModuleInitializationException(
                    "pidNamespace parameter must be specified.", getRole());
        }
        if (m_pidNamespace.length() > 17 || m_pidNamespace.length() < 1) {
            throw new ModuleInitializationException(
                    "pidNamespace parameter must be 1-17 chars long", getRole());
        }
        StringBuffer badChars = new StringBuffer();
        for (int i = 0; i < m_pidNamespace.length(); i++) {
            char c = m_pidNamespace.charAt(i);
            boolean invalid = true;
            if (c >= '0' && c <= '9') {
                invalid = false;
            } else if (c >= 'a' && c <= 'z') {
                invalid = false;
            } else if (c >= 'A' && c <= 'Z') {
                invalid = false;
            } else if (c == '-') {
                invalid = false;
            } else if (c == '.') {
                invalid = false;
            }
            if (invalid) {
                badChars.append(c);
            }
        }
        if (badChars.length() > 0) {
            throw new ModuleInitializationException("pidNamespace contains " +
                    "invalid character(s) '" + badChars.toString() + "'",
                    getRole());
        }
        // storagePool (optional, default=ConnectionPoolManager's default pool)
        m_storagePool = getParameter("storagePool");
        if (m_storagePool == null) {
            logger.debug("Parameter storagePool "
                    + "not given, will defer to ConnectionPoolManager's "
                    + "default pool.");
        }
        // internal storage format (required)
        logger.debug("Server property format.storage= " + Server.STORAGE_FORMAT);
        m_defaultStorageFormat = Server.STORAGE_FORMAT;
        if (m_defaultStorageFormat == null) {
            throw new ModuleInitializationException(
                    "System property format.storage "
                            + "not given, but it's required.", getRole());
        }
        // default export format (required)
        m_defaultExportFormat = getParameter("defaultExportFormat");
        if (m_defaultExportFormat == null) {
            throw new ModuleInitializationException(
                    "Parameter defaultExportFormat "
                            + "not given, but it's required.", getRole());
        }
        // storageCharacterEncoding (optional, default=UTF-8)
        m_storageCharacterEncoding = getParameter("storageCharacterEncoding");
        if (m_storageCharacterEncoding == null) {
            logger.debug("Parameter storage_character_encoding "
                    + "not given, using UTF-8");
            m_storageCharacterEncoding = "UTF-8";
        }
        initRetainPID();

        // readerCacheSize and readerCacheSeconds (optional, defaults = 20, 5)
        String rcSize = getParameter("readerCacheSize");
        if (rcSize == null) {
            logger.debug("Parameter readerCacheSize not given, using 20");
            rcSize = "20";
        }
        int readerCacheSize;
        try {
            readerCacheSize = Integer.parseInt(rcSize);
            if (readerCacheSize < 0) {
                throw new Exception("Cannot be less than zero");
            }
        } catch (Exception e) {
            throw new ModuleInitializationException(
                    "Bad value for readerCacheSize parameter: " +
                            e.getMessage(), getRole());
        }

        String rcSeconds = getParameter("readerCacheSeconds");
        if (rcSeconds == null) {
            logger.debug("Parameter readerCacheSeconds not given, using 5");
            rcSeconds = "5";
        }
        int readerCacheSeconds;
        try {
            readerCacheSeconds = Integer.parseInt(rcSeconds);
            if (readerCacheSeconds < 1) {
                throw new Exception("Cannot be less than one");
            }
        } catch (Exception e) {
            throw new ModuleInitializationException(
                    "Bad value for readerCacheSeconds parameter: " +
                            e.getMessage(), getRole());
        }

        // configuration of ingest validation
        String ingestValidationLevel = getParameter("ingestValidationLevel");
        if (ingestValidationLevel == null) {
            logger.debug("Ingest validation level not specified, using default of all");
            m_ingestValidationLevel = DOValidator.VALIDATE_ALL;
        } else {
            m_ingestValidationLevel = Integer.parseInt(ingestValidationLevel);
            // check the values.  better to declare the levels as enums, but this
            // would require DOValidator interface change
            if (m_ingestValidationLevel < -1 || m_ingestValidationLevel > 2) {
                throw new ModuleInitializationException(
                        "Bad value for ingestValidationLevel", getRole());
            }
        }
    }
329219
protected void addModulesToJetty(ContextHandlerCollection handlers) throws Exception {
    	/* *************
         * Gateway API
         * ************* */
        ServletContextHandler gatewayApiServer = new ServletContextHandler(ServletContextHandler.SESSIONS);
        addSecurityHandler(gatewayApiServer);
        gatewayApiServer.setContextPath("/api");
        gatewayApiServer.addEventListener(new ResteasyBootstrap());
        gatewayApiServer.addEventListener(new WarGatewayBootstrapper());
        gatewayApiServer.addFilter(HttpRequestThreadLocalFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        gatewayApiServer.addFilter(LocaleFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        gatewayApiServer.addFilter(ApimanCorsFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        gatewayApiServer.addFilter(DisableCachingFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        addApiAuthFilter(gatewayApiServer);
        gatewayApiServer.addFilter(RootResourceFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
        ServletHolder resteasyServlet = new ServletHolder(new HttpServletDispatcher());
        resteasyServlet.setInitParameter("javax.ws.rs.Application", GatewayMicroServiceApplication.class.getName());
        gatewayApiServer.addServlet(resteasyServlet, "/*");
        gatewayApiServer.setInitParameter("resteasy.servlet.mapping.prefix", "");

        handlers.addHandler(gatewayApiServer);


        /* *************
         * Gateway
         * ************* */
        ServletContextHandler gatewayServer = new ServletContextHandler(ServletContextHandler.SESSIONS);
        addSecurityHandler(gatewayServer);
        gatewayServer.setContextPath("/gateway");
        ServletHolder servlet = new ServletHolder(new WarGatewayServlet());
        gatewayServer.addServlet(servlet, "/*");

        handlers.addHandler(gatewayServer);
    }
1329196
function preloadRequire (module) {
  if (loadedModules.has(module)) {
    return loadedModules.get(module)
  }
  throw new Error(`module not found: ${module}`)
}
1263345
private void initializeModuleScope(Node moduleBody, Module module, TypedScope moduleScope) {
    if (module.metadata().isGoogModule()) {
      declareExportsInModuleScope(module, moduleBody, moduleScope);
      markGoogModuleExportsAsConst(module);
    }
  }
316521
protected function loadModule() : void
    {
        $fqn = $this->getFullyQualifiedClass($this->response->getModule(), $this->response->getController());
        $the_module = new $fqn();
        call_user_func_array(array($the_module, $this->getActionMethodName($this->response->getAction())), [$this->response->getVariables()]);
    }
364965
private function setByTypeModule(string $module, array $fields) : void
    {
        foreach ($fields as $field) {
            $this->setByTypeModuleField($module, $field);
        }
    }
202300
public void addModule(Module module) {
        LOGGER.debug("adding module {}", module);
        module.setupModule(new ModuleContextImpl(module));
        modules.add(module);
    }
664817
public function registerTypeDataModule(ITypeDataModule $module)
    {
        $this->typeDataModules[] = $module;
        foreach ($module->functions() as $name => $returnType) {
            $normalizedFunctionName                         = $this->normalizeFunctionName($name);
            $this->functionTypeMap[$normalizedFunctionName] = $returnType;
            unset($this->functions[$normalizedFunctionName]);
        }

        foreach ($module->types() as $name => $typeData) {
            $normalizedClassName                      = $this->normalizeClassName($name);
            $this->classTypeMap[$normalizedClassName] = $typeData;
            unset($this->objectTypes[$normalizedClassName]);
        }
    }
167565
async function loadModulesConfig()
{
    if(!modulesLoaded)
    {
		for (let i = 0; i < modules.length; i++) {
			await applyBotDataSource(modules[i]);
        }
        
        modulesLoaded = true;
    }
}
923114
private static function loadPropertiesModule($moduleName) {
        $moduleFileName = get_app()->localConfigPath() . DIRECTORY_SEPARATOR . $moduleName . ".php";
        if (file_exists($moduleFileName)) {
            self::$properties[$moduleName] = @include_once($moduleFileName);
        }
        else {
            $moduleFileName = get_app()->configPath() . DIRECTORY_SEPARATOR . $moduleName . ".php";
            if (file_exists($moduleFileName)) {
                self::$properties[$moduleName] = @include_once($moduleFileName);
            }
        }
    }
584703
@Override
    public ApplicationDescriptor javaModule(String uri) {
        model.createChild("module").createChild("java").text(uri);
        return this;
    }
1167382
function (loadModule) {
            this._rootModule = loadModule.moduleCtrlPrivate;
            this._data = this._rootModule.getData().storage;
            var siteHelper = this._siteConfigHelper;

            ariaUtilsCSSLoader.add(siteHelper.getSiteCss());

            var classesToLoad = siteHelper.getListOfContentProcessors();
            var navigationManagerClass = siteHelper.getNavigationManagerClass();

            if (navigationManagerClass) {
                classesToLoad.push(navigationManagerClass);
            }
            if (siteHelper.siteConfig.animations) {
                classesToLoad.push("aria.pageEngine.utils.AnimationsManager");
            }
            var commonModulesToLoad = siteHelper.getCommonModulesDescription({
                priority : 1
            });

            this._utils.wiseConcat(classesToLoad, this._utils.extractPropertyFromArrayElements(commonModulesToLoad, "classpath"));

            Aria.load({
                classes : classesToLoad,
                oncomplete : {
                    fn : this._loadGlobalModules,
                    scope : this,
                    args : commonModulesToLoad
                },
                onerror : this._getErrorCallbackConfig([this.MISSING_DEPENDENCIES])
            });

        }
1246877
private function loadRequiredModules(
		Module $module,
		&$modules,
		array $moduleList,
		DependencyInjectionContainer $dic) {
		foreach ($module->getRequiredModules() as $requiredModule) {
			if (!\in_array($requiredModule, $moduleList)) {
				$this->loadModule($requiredModule, $modules, $moduleList, $dic);
				if ($module instanceof RequiredModuleAwareModule) {
					$module->addRequiredModule($dic->make($requiredModule));
				}
			}
		}
	}