1 | <?php |
||
33 | trait EventCapableTrait |
||
34 | { |
||
35 | /** |
||
36 | * event manager or dispatcher |
||
37 | * |
||
38 | * @var EventManagerInterface |
||
39 | * @access protected |
||
40 | */ |
||
41 | protected $event_manager; |
||
42 | |||
43 | /** |
||
44 | * event prototype |
||
45 | * |
||
46 | * @var EventInterface |
||
47 | * @access protected |
||
48 | */ |
||
49 | protected $event_proto; |
||
50 | |||
51 | /** |
||
52 | * {@inheritDoc} |
||
53 | */ |
||
54 | public function setEventManager( |
||
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | public function getEventManager()/*# : EventManagerInterface */ |
||
79 | |||
80 | /** |
||
81 | * {@inheritDoc} |
||
82 | */ |
||
83 | public function setEventPrototype(EventInterface $eventPrototype) |
||
88 | |||
89 | /** |
||
90 | * {@inheritDoc} |
||
91 | */ |
||
92 | public function triggerEvent( |
||
105 | |||
106 | /** |
||
107 | * Create an event with $eventName and properties |
||
108 | * |
||
109 | * @param string $eventName |
||
110 | * @param array $properties |
||
111 | * @return EventInterface |
||
112 | * @access protected |
||
113 | */ |
||
114 | protected function createEvent( |
||
129 | } |
||
130 |