• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/engine/router.php
  • Класс: BitrixMainEngineRouter
  • Вызов: Router::includeModule
private function includeModule($module)
{
	if (!ModuleManager::isValidModule($module))
	{
		throw new SystemException(
			"Invalid module name {$module}",
			self::EXCEPTION_INVALID_MODULE_NAME
		);
	}

	if (!Configuration::getInstance($module)->get('controllers'))
	{
		throw new SystemException(
			"There is no configuration in {$module} with 'controllers' value.",
			self::EXCEPTION_NO_CONFIGURATION
		);
	}

	if (!Loader::includeModule($module))
	{
		throw new SystemException("Could not find module {$module}", self::EXCEPTION_NO_MODULE);
	}
}