private function getModuleConfig($moduleName)
    {
        $config = isset($this->config['modules']['config'][$moduleName])
            ? $this->config['modules']['config'][$moduleName]
            : [];

        if (!isset($this->config['modules']['enabled'])) {
            return $config;
        }

        if (!is_array($this->config['modules']['enabled'])) {
            return $config;
        }

        foreach ($this->config['modules']['enabled'] as $enabledModuleConfig) {
            if (!is_array($enabledModuleConfig)) {
                continue;
            }

            $enabledModuleName = key($enabledModuleConfig);
            if ($enabledModuleName === $moduleName) {
                return Configuration::mergeConfigs(reset($enabledModuleConfig), $config);
            }
        }

        return $config;
    }
private function getModuleConfig($moduleName)
    {
        $config = isset($this->config['modules']['config'][$moduleName])
            ? $this->config['modules']['config'][$moduleName]
            : [];

        if (!isset($this->config['modules']['enabled'])) {
            return $config;
        }

        if (!is_array($this->config['modules']['enabled'])) {
            return $config;
        }

        foreach ($this->config['modules']['enabled'] as $enabledModuleConfig) {
            if (!is_array($enabledModuleConfig)) {
                continue;
            }

            $enabledModuleName = key($enabledModuleConfig);
            if ($enabledModuleName === $moduleName) {
                return Configuration::mergeConfigs(reset($enabledModuleConfig), $config);
            }
        }

        return $config;
    }
private function getModuleConfig ( $ moduleName ) { $ config = isset ( $ this -> config [ 'modules' ] [ 'config' ] [ $ moduleName ] ) ? $ this -> config [ 'modules' ] [ 'config' ] [ $ moduleName ] : [ ] ; if ( ! isset ( $ this -> config [ 'modules' ] [ 'enabled' ] ) ) { return $ config ; } if ( ! is_array ( $ this -> config [ 'modules' ] [ 'enabled' ] ) ) { return $ config ; } foreach ( $ this -> config [ 'modules' ] [ 'enabled' ] as $ enabledModuleConfig ) { if ( ! is_array ( $ enabledModuleConfig ) ) { continue ; } $ enabledModuleName = key ( $ enabledModuleConfig ) ; if ( $ enabledModuleName === $ moduleName ) { return Configuration :: mergeConfigs ( reset ( $ enabledModuleConfig ) , $ config ) ; } } return $ config ; }
Get the configuration for a module.

A module with name $moduleName can be configured at two paths in a configuration file:
- modules.config.$moduleName
- modules.enabled.$moduleName

This method checks both locations for configuration. If there is configuration at both locations
this method merges them, where the configuration at modules.enabled.$moduleName takes precedence
over modules.config.$moduleName if the same parameters are configured at both locations.

@param string $moduleName
@return array
Get the configuration for a module .