mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Support installing/updating namespaced modules
모듈 설치 및 업데이트 메소드를 Rhymix\Modules\모듈명\Install 클래스에 넣을 수 있도록 지원한다. 이 클래스가 있는 경우 모듈명과 동일한 클래스를 찾지 않는다. 이로써 클래스 전체를 네임스페이스화할 수 있게 되었다.
This commit is contained in:
parent
adbd29231f
commit
f334889047
5 changed files with 38 additions and 19 deletions
|
|
@ -472,7 +472,7 @@ class installController extends install
|
|||
}
|
||||
// Install "module" module in advance
|
||||
$this->installModule('module','./modules/module');
|
||||
$oModule = getClass('module');
|
||||
$oModule = ModuleModel::getModuleInstallClass($module);
|
||||
if($oModule->checkUpdate()) $oModule->moduleUpdate();
|
||||
// Determine the order of module installation depending on category
|
||||
$install_step = array('system','content','member');
|
||||
|
|
@ -486,7 +486,7 @@ class installController extends install
|
|||
if($module == 'module') continue;
|
||||
$this->installModule($module, sprintf('./modules/%s', $module));
|
||||
|
||||
$oModule = getClass($module);
|
||||
$oModule = ModuleModel::getModuleInstallClass($module);
|
||||
if(is_object($oModule) && method_exists($oModule, 'checkUpdate'))
|
||||
{
|
||||
if($oModule->checkUpdate()) $oModule->moduleUpdate();
|
||||
|
|
@ -507,7 +507,7 @@ class installController extends install
|
|||
if($module == 'module') continue;
|
||||
$this->installModule($module, sprintf('./modules/%s', $module));
|
||||
|
||||
$oModule = getClass($module);
|
||||
$oModule = ModuleModel::getModuleInstallClass($module);
|
||||
if($oModule && method_exists($oModule, 'checkUpdate') && method_exists($oModule, 'moduleUpdate'))
|
||||
{
|
||||
if($oModule->checkUpdate()) $oModule->moduleUpdate();
|
||||
|
|
@ -555,7 +555,7 @@ class installController extends install
|
|||
}
|
||||
// Create a table and module instance and then execute install() method
|
||||
unset($oModule);
|
||||
$oModule = getClass($module);
|
||||
$oModule = ModuleModel::getModuleInstallClass($module);
|
||||
if(method_exists($oModule, 'moduleInstall')) $oModule->moduleInstall();
|
||||
return new BaseObject();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue