/**
* Boots the module with the given name.
*
* @param string $module The module to boot
* @param string $applicationName The application name
*
* @return ModuleInterface
*
* @since 4.0.0
*/
public function bootModule($module, $applicationName) : ModuleInterface
{
// Normalize the module name
$module = strtolower(str_replace('mod_', '', $module));
// Path to to look for services
$path = JPATH_SITE . '/modules/mod_' . $module;
if ($applicationName === 'administrator') {
$path = JPATH_ADMINISTRATOR . '/modules/mod_' . $module;
}
return $this->loadExtension(ModuleInterface::class, $module, $path);
}