| 1 | <?php |
||
| 13 | trait EventDispatcherTrait |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var EventDispatcher |
||
| 18 | */ |
||
| 19 | private $dispatcher; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @Inject("@EventDispatcher") |
||
| 23 | * @param EventDispatcher $dispatcher |
||
| 24 | */ |
||
| 25 | 7 | public function setEventDispatcher(EventDispatcher $dispatcher) |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return EventDispatcher |
||
| 32 | */ |
||
| 33 | public function getDispatcher() : EventDispatcher |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param AbstractEvent $event |
||
| 40 | */ |
||
| 41 | 4 | public function dispatchEvent(AbstractEvent $event) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @param AbstractEvent $event |
||
| 48 | * @param int|null $timestamp |
||
| 49 | * @return Job |
||
| 50 | */ |
||
| 51 | 1 | public function dispatchInBackground(AbstractEvent $event, int $timestamp = 0) |
|
| 55 | } |
||
| 56 |