mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-18 19:53:27 +02:00
triggerFilter -> pass by reference (faster x5)
This commit is contained in:
@@ -30,7 +30,7 @@ class Hooks
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function triggerFilter($type, $args = [])
|
||||
public function triggerFilter($type, &...$args)
|
||||
{
|
||||
if(isset(self::$_hooks[$type])) {
|
||||
foreach(self::$_hooks[$type] as $hook) {
|
||||
@@ -38,8 +38,6 @@ class Hooks
|
||||
$args = $hook->executeFilter(...$args);
|
||||
}
|
||||
}
|
||||
|
||||
return $args;
|
||||
}
|
||||
|
||||
public function exist($type): bool {
|
||||
|
Reference in New Issue
Block a user