Normalizes a module name by converting periods and forward slashes into backslashes (for namespaces). This
function should always remain idempotent.
public normalizeModuleName ( string $moduleName ) : string | ||
$moduleName | string | |
return | string |
/** * Create service * * @param string $module * * @return ModuleVersioningModel */ public function factory($module) { $moduleName = $this->moduleUtils->normalizeModuleName($module); if (!isset($this->models[$moduleName])) { $config = $this->configFactory->factory($moduleName); $docsConfig = $this->getDocsConfig($moduleName); $this->models[$moduleName] = ModuleVersioningModel::createWithPathSpec($moduleName, $this->moduleUtils, $config, $docsConfig); } return $this->models[$moduleName]; }
/** * @param string $name * @return string * @deprecated */ protected function normalizeModuleName($name) { return $this->moduleUtils->normalizeModuleName($name); }
/** * createWithPathSpec * * @param string $moduleName * @param ModulePathSpec $pathSpec * @param ConfigResource $config * @param ConfigResource|null $docsConfig * * @return static */ public static function createWithPathSpec($moduleName, ModulePathSpec $pathSpec, ConfigResource $config, ConfigResource $docsConfig = null) { $moduleName = $pathSpec->normalizeModuleName((string) $moduleName); return new static($moduleName, $pathSpec->getModuleConfigPath($moduleName), $pathSpec->getModuleSourcePath($moduleName), $config, $docsConfig, $pathSpec->getPathSpec()); }