protected function filterModuleConfig($moduleConfig, $moduleName)
    {
        if (!ArrayUtils::isHashTable($moduleConfig, true)) {
            $errMsg = sprintf('The configuration for module "%s" is invalid', $moduleName);
            throw new Exception\RuntimeException($errMsg);
        }

        if (isset($moduleConfig['view'])) {
            $realPathView = realpath($moduleConfig['view'][$moduleName]);
            if (!$realPathView) {
                $errMsg = sprintf('The view path for module "%s" is invalid', $moduleName);
                throw new Exception\RuntimeException($errMsg);
            }
            $moduleConfig['view'][$moduleName] = $realPathView;
        }
        
        if (isset($moduleConfig['volt']) && isset($moduleConfig['volt'][$moduleName]['path'])) {
            $path = realpath($moduleConfig['volt'][$moduleName]['path']);
            unset($moduleConfig['volt'][$moduleName]['path']);
            if ($path) {
                $moduleConfig['volt'][$moduleName]['path'] = $path;
            }
        }

        return $moduleConfig;
    }