Get Asterisk module information.

@param string $moduleName Module's name
@return Module
@throws NotFoundException
@throws ConflictException
486976
public function getModule($moduleName)
    {
        $uri = "asterisk/module/$moduleName";

        $response = $this->client->getEndpoint()->get($uri);

        return new Module(\GuzzleHttp\json_decode($response->getBody()));
    }
172665
public function getLangAttribute($sName, $sLangCode = null)
    {
        if (empty($sName)) {
            return null;
        }

        if (empty($sLangCode)) {
            $sLangCode = self::$sActiveLang;
        }

        if (empty($sLangCode)) {
            return $this->getAttribute($sName);
        }

        $sLangName = $sName.'|'.$sLangCode;
        if (!empty($this->arModelData) && isset($this->arModelData[$sLangName])) {
            return $this->arModelData[$sLangName];
        }

        return $this->getAttribute($sName);
    }
1012099
protected function &internalGetModular(string $name) : ModularAbstract
    {
        $modularName = $this->sanitizeModularName($name);
        if (!$modularName) {
            throw new InvalidArgumentException(
                "Please insert not an empty arguments",
                E_USER_ERROR
            );
        }

        if (!$this->exist($modularName)) {
            throw new InvalidModularException(
                sprintf(
                    '%1$s %2$s has not found',
                    $this->modularParser->getName(),
                    $name
                )
            );
        }

        if (is_array($this->validModular[$modularName])) {
            $className = empty($this->validModular[$modularName][static::CLASS_NAME_KEY])
                ? null
                : (string) $this->validModular[$modularName][static::CLASS_NAME_KEY];

            if (! $className
                || ! class_exists($this->validModular[$modularName][static::CLASS_NAME_KEY])
            ) {
                throw new InvalidModularException(
                    sprintf(
                        '%1$s %2$s has not found',
                        $this->modularParser->getName(),
                        $name
                    )
                );
            }

            $modular = new $className(
                $this->modularParser->getContainer(),
                $modularName
            );

            $this->validModular[$modularName] = $modular;
        }

        if (! $this->validModular[$modularName] instanceof ModularAbstract) {
            unset($this->validModular[$modularName]);
            $e = new InvalidModularException(
                sprintf(
                    '%1$s %2$s Is not valid.',
                    $this->modularParser->getName(),
                    $name
                )
            );

            $this->invalidModular[$modularName] = $e;
            throw $e;
        }

        return $this->validModular[$modularName];
    }
259427
public static String getModuleName(final String moduleId) {
        final int splitter = moduleId.indexOf(':');
        if(splitter == -1){
            return moduleId;
        }
        return moduleId.substring(0, splitter);
    }
723863
public function moduleContent($moduleName)
    {
        if ($this->isAdminContext() || empty($moduleName) || count($this->getEnvOptions()) === 0 || !Yii::$app->hasModule($moduleName)) {
            return;
        }
        
        // get module
        $module = Yii::$app->getModule($moduleName);
        $module->context = 'cms';
        
        // start module reflection
        $reflection = Yii::createObject(['class' => ModuleReflection::class, 'module' => $module]);
        $reflection->suffix = $this->getEnvOption('restString');

        $args = Json::decode($this->getCfgValue('moduleActionArgs', '{}'));
        
        // if a controller has been defined we inject a custom starting route for the
        // module reflection object.
        $ctrl = $this->getCfgValue('moduleController');
        if (!empty($ctrl)) {
            $reflection->defaultRoute($ctrl, $this->getCfgValue('moduleAction', 'index'), $args);
        }
        
        if ($this->getCfgValue('strictRender')) {
            $reflection->setRequestRoute(implode("/", [$this->getCfgValue('moduleController', $module->defaultRoute), $this->getCfgValue('moduleAction', 'index')]), $args);
        } else {
            Yii::$app->request->queryParams = array_merge($reflection->getRequestRoute()['args'], Yii::$app->request->queryParams);
        }

        $response = $reflection->run();
        
        if ($response instanceof Response) {
            return Yii::$app->end(0, $response);
        }
        
        return $response;
    }
1110158
public static function moduleClass($moduleName = 'Module')
    {
        $result = false;

        $className = get_called_class();
        $refClass = new ReflectionClass($className);
        $ns = $refClass->getNamespaceName();

        $len = strlen($ns) - strlen(UniModule::$modelsSubdir);
        if (strrpos($ns, UniModule::$modelsSubdir) == $len) {
           $ns = substr($ns, 0, $len);
           $result = $ns . $moduleName;
        }

        return $result;
    }
14863
function (moduleName) {
            var moduleNames = Utils.unalias(S, Utils.normalizeModNamesWithAlias(S, [moduleName]));
            if (Utils.attachModsRecursively(moduleNames, S)) {
                return Utils.getModules(S, moduleNames)[1];
            }
            return undefined;
        }
550752
public function getRequiredModules($moduleName) {
        $moduleName = strtolower($moduleName);
        if (isset($this->_requiredModules[$moduleName])) {
            return $this->_requiredModules[$moduleName];
        }
        else {
            return null;
        }
    }
678173
protected function resolve(string $directiveName): ?Directive
    {
        if ($className = Arr::get($this->resolved, $directiveName)) {
            return app($className);
        }

        return null;
    }
1307029
public function optimizeIndex($moduleName)
    {
        $translator = $this->getServiceLocator()->get('translator');
        $status = $translator->translate('tr_melis_engine_search_optimize');
        $lucenePath = self::FOLDER_PATH.$moduleName.'/'.self::FOLDER_NAME . '/indexes';

        if(file_exists($lucenePath) && is_readable($lucenePath)) {
            $index = Lucene::open($lucenePath);
            $index->optimize();
        }

        return $status;

    }
724683
public function getCssModuleTags(string $moduleName, bool $async = false, $config = null): string
    {
        $settings = Twigpack::$plugin->getSettings();
        $config = $config ?? $settings->getAttributes();

        return ManifestHelper::getCssModuleTags($config, $moduleName, $async);
    }
896473
public function getReleases($moduleName, $coreVersion)
    {
        $request = $this->httpClient->get(['{module_name}/{core_version}', 
            ['module_name' => $moduleName, 'core_version' => $coreVersion]]);
        
        if ($request->getStatusCode() != 200) {
            throw new \Exception(sprintf('Status code was not OK. %d returned instead.', $request->getStatusCode()));
        }
        
        $response   = (string) $request->getBody();
        return $this->xmlToArray($response);
    }
717749
public function getModuleIdByClassName($className)
    {
        if (!\OxidEsales\Eshop\Core\NamespaceInformationProvider::isNamespacedClass($className)) {
            return $this->backwardsCompatibleGetModuleIdByClassName($className);
        }

        $moduleId = '';
        $extensions = (array) \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('aModuleExtensions');
        foreach ($extensions as $id => $moduleClasses) {
            if (in_array($className, $moduleClasses)) {
                $moduleId = $id;
                break;
            }
        }

        return $moduleId;
    }
762288
protected function getClassIdFromModuleMap($className)
    {
        $moduleControllerMapProvider = $this->getModuleControllerMapProvider();
        $idToNameMap = $moduleControllerMapProvider->getControllerMap();
        $classId = $this->arrayLookup($className, array_flip($idToNameMap));

        return $classId;
    }
673247
protected function getRequiredModule(string $className) {
		if (\array_key_exists($className, $this->modules)) {
			return $this->modules[$className];
		} else {
			throw new ConfigurationException(__CLASS__ . ' tried to request module ' . $className .
				', but it was not listed as a dependency or has not yet added.');
		}
	}
903903
public function getModule($moduleName) {
        $moduleName = strtolower($moduleName);
        if (isset(self::$_modules[$moduleName])) {
            return self::$_modules[$moduleName];
        } else {
            try {
                return $this->loadModule($moduleName);
            }
            catch (\Exception $e) {
                throw new ModuleException("Cannot find requested module: $moduleName");
            }
        }
    }
114789
def getModule(self, moduleName):
        
        if moduleName not in self.moduleCache:
            modulePath = FilePath(
                athena.jsDeps.getModuleForName(moduleName)._cache.path)
            cachedModule = self.moduleCache[moduleName] = CachedJSModule(
                moduleName, modulePath)
        else:
            cachedModule = self.moduleCache[moduleName]
        return cachedModule