* Add fetchModule to distinguish rawModule.
This commit is contained in:
@@ -312,6 +312,26 @@ class control extends baseControl
|
||||
chdir($currentPWD);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个方法的输出内容,这样我们可以在一个方法里获取其他模块方法的内容。
|
||||
* 如果模块名为空,则调用该模块、该方法;如果设置了模块名,调用指定模块指定方法。
|
||||
*
|
||||
* Get the output of one module's one method as a string, thus in one module's method, can fetch other module's content.
|
||||
* If the module name is empty, then use the current module and method. If set, use the user defined module and method.
|
||||
*
|
||||
* @param string $moduleName module name.
|
||||
* @param string $methodName method name.
|
||||
* @param array $params params.
|
||||
* @access public
|
||||
* @return string the parsed html.
|
||||
*/
|
||||
public function fetch($moduleName = '', $methodName = '', $params = array(), $appName = '')
|
||||
{
|
||||
if($moduleName != $this->moduleName) $this->app->fetchModule = $moduleName;
|
||||
|
||||
return parent::fetch($moduleName, $methodName, $params, $appName);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build operate menu of a method.
|
||||
*
|
||||
|
||||
@@ -46,6 +46,15 @@ class router extends baseRouter
|
||||
*/
|
||||
public $isFlow = false;
|
||||
|
||||
/**
|
||||
* Fetch的模块名。
|
||||
* The fetched module name.
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public $fetchModule;
|
||||
|
||||
/**
|
||||
* Get the $moduleRoot var.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user