1 | <?php |
||
25 | class Events |
||
26 | { |
||
27 | /** @type array event delegates */ |
||
28 | public $delegates = []; |
||
29 | /** @type array event depth */ |
||
30 | public $eventDepth = []; |
||
31 | /** @type bool indicates the event manager is currently disabled or not */ |
||
32 | public $disabled = false; |
||
33 | |||
34 | |||
35 | /** |
||
36 | * Dispatches an event |
||
37 | * |
||
38 | * @param string $uEvent name of the event |
||
39 | * @param array $uEventArgs arguments for the event |
||
40 | * |
||
41 | * @return void |
||
42 | */ |
||
43 | public function dispatch($uEvent, ...$uEventArgs) |
||
57 | |||
58 | /** |
||
59 | * Subscribes a callback method to specified event |
||
60 | * |
||
61 | * @param string $uEvent event |
||
62 | * @param callable $uCallback callback |
||
63 | * @param mixed $uState state object |
||
64 | * @param null|int $uPriority priority |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | public function on($uEvent, $uCallback, $uState = null, $uPriority = null) |
||
76 | } |
||
77 |