mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-11 22:42:14 +09:00
#19122530 Module Extend 지원
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@7684 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8595952528
commit
f55fbeef9d
3 changed files with 96 additions and 3 deletions
|
|
@ -295,6 +295,46 @@
|
|||
return $output->data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 특정 module extend 가져옴
|
||||
**/
|
||||
function getModuleExtend($parent_module, $type, $kind='') {
|
||||
$module_extend_info = $this->loadModuleExtends();
|
||||
$extend = $module_extend_info[$parent_module.'.'.$kind.'.'.$type];
|
||||
|
||||
return $extend;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모든 module extend 가져옴
|
||||
**/
|
||||
function loadModuleExtends() {
|
||||
$cache_file = './files/config/module_extend.php';
|
||||
$cache_file = FileHandler::getRealPath($cache_file);
|
||||
|
||||
if(!isset($GLOBALS['__MODULE_EXTEND__'])){
|
||||
if(!file_exists($cache_file)) {
|
||||
|
||||
$arr = array();
|
||||
$output = executeQueryArray('module.getModuleExtend');
|
||||
if($output->data){
|
||||
foreach($output->data as $v){
|
||||
$arr[] = sprintf("'%s.%s.%s' => '%s'", $v->parent_module, $v->type, $v->kind, $v->extend_module);
|
||||
}
|
||||
}
|
||||
|
||||
$str = '<?PHP $__module_extend_info__=array(%s); return $__module_extend_info__; ?>';
|
||||
$str = sprintf($str, join(',',$arr));
|
||||
|
||||
FileHandler::writeFile($cache_file, $str);
|
||||
}
|
||||
|
||||
$GLOBALS['__MODULE_EXTEND__'] = include($cache_file);
|
||||
}
|
||||
|
||||
return $GLOBALS['__MODULE_EXTEND__'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 모듈의 conf/info.xml 을 읽어서 정보를 구함
|
||||
**/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue