Support installing/updating namespaced modules

모듈 설치 및 업데이트 메소드를 Rhymix\Modules\모듈명\Install 클래스에
넣을 수 있도록 지원한다. 이 클래스가 있는 경우 모듈명과 동일한 클래스를
찾지 않는다. 이로써 클래스 전체를 네임스페이스화할 수 있게 되었다.
This commit is contained in:
Kijin Sung 2022-01-04 01:37:38 +09:00
parent adbd29231f
commit f334889047
5 changed files with 38 additions and 19 deletions

View file

@ -38,8 +38,11 @@ class installAdminController extends install
$module_name = Context::get('module_name');
if(!$module_name) throw new Rhymix\Framework\Exceptions\InvalidRequest;
$oModule = getModule($module_name, 'class');
if(!$oModule) throw new Rhymix\Framework\Exceptions\InvalidRequest;
$oModule = ModuleModel::getModuleInstallClass($module_name);
if(!$oModule || !method_exists($oModule, 'moduleUpdate'))
{
throw new Rhymix\Framework\Exceptions\InvalidRequest;
}
Rhymix\Framework\Session::close();