* Adjust the comments.

This commit is contained in:
Guan Xiying
2022-10-18 16:45:52 +08:00
parent b9b8b6e584
commit 8d961926a4
5 changed files with 29 additions and 23 deletions
+4 -3
View File
@@ -266,9 +266,10 @@ class baseControl
* Load the model file of one module.
*
* @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name.
* @param string $appName The app name, if empty, use current app's name.
* @access public
* @return object|bool 如果没有model文件,返回false,否则返回model对象。If no model file, return false, else return the model object.
* @param string $appName 应用名,如果为空,使用当前应用。The app name, if empty, use current app's name.
* @param string $type 对象的类型,可选值 model、zen、tao,默认为 model。The type of the object, optional values model, zen, tao, the default is model.
* @access public
* @return object|bool 如果没有model文件,返回false,否则返回model对象。If no model file, return false, else return the model object.
*/
public function loadModel($moduleName = '', $appName = '', $type = 'model')
{
+5 -3
View File
@@ -199,9 +199,11 @@ class baseModel
*
* Load the model of one module. After loaded, can use $this->$moduleName to visit the model object.
*
* @param string $moduleName
* @access public
* @return object|bool the model object or false if model file not exists.
* @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name.
* @param string $appName 应用名,如果为空,使用当前应用。The app name, if empty, use current app's name.
* @param string $type 对象的类型,可选值 model、zen、tao,默认为 model。The type of the object, optional values model, zen, tao, the default is model.
* @access public
* @return object|bool the model object or false if model file not exists.
*/
public function loadModel($moduleName, $appName = '', $type = 'model')
{
+6 -6
View File
@@ -1623,7 +1623,7 @@ class baseRouter
*
* @param string $appName the app name
* @param string $moduleName the module name
* @param string $ext the extension type, can be control|model|view|lang|config
* @param string $ext the extension type, can be control|model|view|lang|config|zen|tao
* @access public
* @return string the extension path.
*/
@@ -1775,11 +1775,11 @@ class baseRouter
* 设置一个模块的model文件,如果存在model扩展,一起合并。
* Set the model file of one module. If there's an extension file, merge it with the main model file.
*
* @param string $moduleName the module name
* @param string $appName the app name
* @static
* @access public
* @return string the model file
* @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name.
* @param string $appName 应用名,如果为空,使用当前应用。The app name, if empty, use current app's name.
* @param string $type 对象的类型,可选值 model、zen、tao,默认为 model。The type of the object, optional values model, zen, tao, the default is model.
* @access public
* @return string the model file
*/
public function setModelFile($moduleName, $appName = '', $type = 'model')
{
+7 -6
View File
@@ -172,15 +172,16 @@ class control extends baseControl
}
/**
* 企业版部分功能是从然之合并过来的。然之代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。
* 企业版部分功能是从然之合并过来的。ZDOO代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。
* 调用父类的loadModel方法来避免这个错误。
* Some codes merged from ranzhi called the function loadModel with a non-empty appName which causes an error in zentao.
* Some codes merged from ZDOO called the function loadModel with a non-empty appName which causes an error in zentao.
* Call the parent function with empty appName to avoid this error.
*
* @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name.
* @param string $appName The app name, if empty, use current app's name.
* @access public
* @return object|bool 如果没有model文件,返回false,否则返回model对象。If no model file, return false, else return the model object.
* @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name.
* @param string $appName 应用名,如果为空,使用当前应用。The app name, if empty, use current app's name.
* @param string $type 对象的类型,可选值 model、zen、tao,默认为 model。The type of the object, optional values model, zen, tao, the default is model.
* @access public
* @return object|bool 如果没有model文件,返回false,否则返回model对象。If no model file, return false, else return the model object.
*/
public function loadModel($moduleName = '', $appName = '', $type = 'model')
{
+7 -5
View File
@@ -40,14 +40,16 @@ class model extends baseModel
}
/**
* 企业版部分功能是从然之合并过来的。然之代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。
* 企业版部分功能是从然之合并过来的。ZDOO代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。
* 调用父类的loadModel方法来避免这个错误。
* Some codes merged from ranzhi called the function loadModel with a non-empty appName which causes an error in zentao.
* Some codes merged from ZDOO called the function loadModel with a non-empty appName which causes an error in zentao.
* Call the parent function with empty appName to avoid this error.
*
* @param string $moduleName
* @access public
* @return object|bool the model object or false if model file not exists.
* @param string $moduleName 模块名,如果为空,使用当前模块。The module name, if empty, use current module's name.
* @param string $appName 应用名,如果为空,使用当前应用。The app name, if empty, use current app's name.
* @param string $type 对象的类型,可选值 model、zen、tao,默认为 model。The type of the object, optional values model, zen, tao, the default is model.
* @access public
* @return object|bool the model object or false if model file not exists.
*/
public function loadModel($moduleName, $appName = '', $type = 'model')
{