1 | <?php |
||
34 | trait EventCapableTrait |
||
35 | { |
||
36 | use EventPrototypeTrait; |
||
37 | |||
38 | /** |
||
39 | * event manager or dispatcher |
||
40 | * |
||
41 | * @var EventManagerInterface |
||
42 | * @access protected |
||
43 | */ |
||
44 | protected $event_manager; |
||
45 | |||
46 | /** |
||
47 | * flag for attachListener |
||
48 | * |
||
49 | * @var bool |
||
50 | * @access protected |
||
51 | * @since 2.1.5 |
||
52 | */ |
||
53 | protected $listener_attached = false; |
||
54 | |||
55 | /** |
||
56 | * {@inheritDoc} |
||
57 | * |
||
58 | * @since 2.1.5 moved attachListener to getEventManager |
||
59 | */ |
||
60 | public function setEventManager( |
||
66 | |||
67 | /** |
||
68 | * {@inheritDoc} |
||
69 | * |
||
70 | * @since 2.1.5 added attachSelfToEventManager() |
||
71 | */ |
||
72 | public function getEventManager()/*# : EventManagerInterface */ |
||
85 | |||
86 | /** |
||
87 | * {@inheritDoc} |
||
88 | */ |
||
89 | public function trigger( |
||
96 | |||
97 | /** |
||
98 | * {@inheritDoc} |
||
99 | */ |
||
100 | public function triggerEvent( |
||
108 | |||
109 | /** |
||
110 | * Attach $this to the event manager if not yet |
||
111 | * |
||
112 | * @access protected |
||
113 | * @since 2.1.5 |
||
114 | */ |
||
115 | protected function attachSelfToEventManager() |
||
126 | } |
||
127 |