1 | <?php |
||
41 | class StaticEventDispatcher extends StaticAbstract |
||
42 | { |
||
43 | /** |
||
44 | * slave event manager |
||
45 | * |
||
46 | * @var EventManagerInterface[] |
||
47 | * @access protected |
||
48 | * @staticvar |
||
49 | */ |
||
50 | protected static $event_manager = []; |
||
51 | |||
52 | /** |
||
53 | * default static scope |
||
54 | * |
||
55 | * @var string |
||
56 | * @access protected |
||
57 | * @staticvar |
||
58 | */ |
||
59 | protected static $static_scope = '__STATIC__'; |
||
60 | |||
61 | /** |
||
62 | * Provides a static interface for event dispatcher's dynamic methods |
||
63 | * |
||
64 | * @param string $name method name |
||
65 | * @param array $arguments arguments |
||
66 | * @return mixed |
||
67 | * @throws BadMethodCallException if method not found |
||
68 | * @access public |
||
69 | * @static |
||
70 | * @internal |
||
71 | */ |
||
72 | public static function __callStatic($name, array $arguments) |
||
88 | |||
89 | /** |
||
90 | * Set the inner event manager |
||
91 | * |
||
92 | * @param EventManagerInterface $eventManager |
||
93 | * @access public |
||
94 | * @api |
||
95 | * @static |
||
96 | */ |
||
97 | public static function setEventManager(EventManagerInterface $eventManager) |
||
101 | |||
102 | /** |
||
103 | * Get the inner event manager |
||
104 | * |
||
105 | * @return EventManagerInterface $eventManager |
||
106 | * @access public |
||
107 | * @api |
||
108 | * @static |
||
109 | */ |
||
110 | public static function getEventManager() |
||
118 | } |
||
119 |