mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
모듈 클래스 로딩에서 autoload를 사용할 수 있도록 함
This commit is contained in:
parent
cc572122b2
commit
d0753e746b
2 changed files with 14 additions and 19 deletions
|
|
@ -332,6 +332,14 @@ if(!defined('__XE_LOADED_CLASS__'))
|
|||
{
|
||||
require _XE_PATH_ . $GLOBALS['__xe_autoload_file_map'][$class_name];
|
||||
}
|
||||
elseif(preg_match('/^([a-z0-9_]+?)(admin)?(view|controller|model|api|wap|mobile)?$/i', $class_name, $matches))
|
||||
{
|
||||
$candidate_filename = 'modules/' . $matches[1] . '/' . $matches[1] . ($matches[2] ? '.admin' : '') . ($matches[3] ? ('.' . $matches[3]) : '.class') . '.php';
|
||||
if(file_exists(_XE_PATH_ . $candidate_filename))
|
||||
{
|
||||
require _XE_PATH_ . $candidate_filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
spl_autoload_register('__xe_autoload');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue