Conditions | 6 |
Paths | 4 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public static function trigger($name, $argument = null) { |
||
17 | foreach (self::$events[$name] as $event => $callback) { |
||
18 | if($argument && is_array($argument)) { |
||
19 | call_user_func_array($callback, $argument); |
||
20 | } |
||
21 | elseif ($argument && !is_array($argument)) { |
||
22 | call_user_func($callback, $argument); |
||
23 | } |
||
24 | else { |
||
25 | call_user_func($callback); |
||
26 | } |
||
27 | } |
||
28 | } |
||
29 | } |