mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Support calling namespaced class in trigger
This commit is contained in:
parent
eb10708a88
commit
51173863c1
1 changed files with 14 additions and 2 deletions
|
|
@ -1249,8 +1249,20 @@ class ModuleHandler extends Handler
|
||||||
$type = $item->type;
|
$type = $item->type;
|
||||||
$called_method = $item->called_method;
|
$called_method = $item->called_method;
|
||||||
|
|
||||||
// todo why don't we call a normal class object ?
|
// Get instance of module class
|
||||||
$oModule = getModule($module, $type);
|
if (strpos($type, '\\') !== false)
|
||||||
|
{
|
||||||
|
$class_name = sprintf('Rhymix\\Modules\\%s\\%s', $module, $type);
|
||||||
|
if (class_exists($class_name))
|
||||||
|
{
|
||||||
|
$oModule = $class_name::getInstance();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$oModule = getModule($module, $type);
|
||||||
|
}
|
||||||
|
|
||||||
if(!$oModule || !method_exists($oModule, $called_method))
|
if(!$oModule || !method_exists($oModule, $called_method))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue