diff --git a/framework/base/control.class.php b/framework/base/control.class.php index f902c426e1..a1a4c28c07 100644 --- a/framework/base/control.class.php +++ b/framework/base/control.class.php @@ -264,8 +264,10 @@ class baseControl } /** - * 加载指定模块的model对象。 - * Load the model object of one module. + * 加载一个模块的model对象。加载完成后,使用$this->$moduleName来访问这个model对象。 + * 比如:loadModel('user')引入user模块的model实例对象,可以通过$this->user来访问它。 + * + * Load the model object of one module. After loaded, can use $this->$moduleName to visit 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. @@ -294,8 +296,10 @@ class baseControl } /** - * 加载指定模块的zen对象。 - * Load the zen object of one module. + * 加载一个模块的zen对象。加载完成后,使用$this->{$moduleName}Zen来访问这个zen对象。 + * 比如:loadZen('user')引入user模块的zen实例对象,可以通过$this->userZen来访问它。 + * + * Load the zen object of one module. After loaded, can use $this->{$moduleName}Zen to visit the zen 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. diff --git a/framework/base/model.class.php b/framework/base/model.class.php index 3b4eba3e61..84437a42f8 100644 --- a/framework/base/model.class.php +++ b/framework/base/model.class.php @@ -204,7 +204,7 @@ class baseModel * @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 the model object or false if model file not exists. + * @return object|bool 如果没有model文件,返回false,否则返回model对象。If no model file, return false, else return the model object. */ public function loadModel($moduleName, $appName = '') { @@ -212,15 +212,15 @@ class baseModel } /** - * 加载一个模块的tao对象。加载完成后,使用$this->$moduleName来访问这个tao对象。 - * 比如:loadModel('user')引入user模块的tao实例对象,可以通过$this->user来访问它。 + * 加载一个模块的tao对象。加载完成后,使用$this->{$moduleName}Tao来访问这个tao对象。 + * 比如:loadTao('user')引入user模块的tao实例对象,可以通过$this->userTao来访问它。 * - * Load the tao object of one module. After loaded, can use $this->$moduleName to visit the tao object. + * Load the tao object of one module. After loaded, can use $this->{$moduleName}Tao to visit the tao 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. * @access public - * @return object|bool the tao object or false if tao file not exists. + * @return object|bool 如果没有tao文件,返回false,否则返回tao对象。If no tao file, return false, else return the tao object. */ public function loadTao($moduleName, $appName = '') {