References like in CI4

This commit is contained in:
cgfhtw
2023-12-04 10:37:10 +01:00
parent 4ba828d0e8
commit 9c2ece2bda
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ class CI3_Events
self::$eventsSorted[$event] = false;
}
public static function trigger($event, &...$args)
public static function trigger($event, ...$args)
{
if (!isset(self::$events[$event]))
return;
@@ -37,7 +37,7 @@ class CI3_Events
}
foreach (self::$events[$event] as $conf) {
call_user_func_array($conf[1], $args);
$conf[1](...$args);
}
}
}