* Refactor the magic method to support call static method. Only static
methods of classes declared in a zen file or an ext zen file or a tao file or an ext tao file can be called.
This commit is contained in:
@@ -666,8 +666,10 @@ class control extends baseControl
|
||||
{
|
||||
global $app;
|
||||
$moduleName = $app->getModuleName();
|
||||
$zenClass = $moduleName . 'Zen';
|
||||
$zenClass = 'ext' . $moduleName . 'Zen';
|
||||
if(is_callable("{$zenClass}::{$method}")) return call_user_func_array("{$zenClass}::{$method}", $arguments);
|
||||
|
||||
$zenClass = $moduleName . 'Zen';
|
||||
if(is_callable("{$zenClass}::{$method}")) return call_user_func_array("{$zenClass}::{$method}", $arguments);
|
||||
|
||||
$app->triggerError("the module {$moduleName} has no {$method} method", __FILE__, __LINE__, $exit = true);
|
||||
|
||||
Reference in New Issue
Block a user