* Refactoring for extension.

This commit is contained in:
zhujinyong
2022-01-10 22:39:54 +08:00
parent 15a142af8a
commit b4c3ec0a9c
8 changed files with 167 additions and 47 deletions
+15
View File
@@ -202,6 +202,21 @@ class baseHelper
return true;
}
/**
* 使用helper::importControl()来引入Control文件,不要直接使用include或者require.
* Using helper::importControl() to import a file, instead of include or require.
*
* @param string $moduleName.
* @static
* @access public
* @return bool
*/
static public function importControl($moduleName)
{
global $app;
return helper::import($app->getModulePath($moduleName) . 'control.php');
}
/**
* 将数组或者列表转化成 IN( 'a', 'b') 的形式。
* Convert a list to IN('a', 'b') string.