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 trigger( |
||
102 | |||
103 | /** |
||
104 | * {@inheritDoc} |
||
105 | */ |
||
106 | public function triggerEvent( |
||
119 | |||
120 | /** |
||
121 | * Create an event with $eventName and properties |
||
122 | * |
||
123 | * @param string $eventName |
||
124 | * @param array $properties |
||
125 | * @return EventInterface |
||
126 | * @access protected |
||
127 | */ |
||
128 | protected function createEvent( |
||
143 | } |
||
144 |