| 1 | <?php |
||
| 17 | trait Event |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Register an event listener. |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public function addEventListener(EventListener $xEventListener) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Trigger an event. |
||
| 31 | * |
||
| 32 | * @param string $sEvent The event name |
||
| 33 | * |
||
| 34 | * @return void |
||
| 35 | */ |
||
| 36 | public function triggerEvent($sEvent) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Return an array of events to listen to. |
||
| 43 | * |
||
| 44 | * This is the default implementation on the EventListener interface. |
||
| 45 | * |
||
| 46 | * @return array An empty array |
||
| 47 | */ |
||
| 48 | public function getEvents() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Return an array of events to listen to. |
||
| 55 | * |
||
| 56 | * This is the implementation of the Lemon\Event\EventSubscriberInterface interface. |
||
| 57 | * |
||
| 58 | * @return array The event names to listen to |
||
| 59 | */ |
||
| 60 | public function getSubscribedEvents() |
||
| 64 | } |
||
| 65 |