* Code review for issue api.

This commit is contained in:
zhujinyong
2021-08-25 17:29:59 +08:00
parent 224977ab88
commit ce09fc310f
9 changed files with 41 additions and 19 deletions
+19
View File
@@ -509,4 +509,23 @@ class baseEntry
return $value;
}
}
/**
* 获取其他方法的执行结果。
* Fetch result of other method.
*
* @param string $entry
* @param string $method
* @param array $params
* @access public
* @return void
*/
public function fetch($entry, $method, $params = array())
{
include($this->app->appRoot . "api/{$this->app->version}/entries/" . strtolower($entry) . ".php");
$entryName = $entry . 'Entry';
$entry = new $entryName();
return call_user_func_array(array($entry, $method), $params);
}
}