/** * Publish an event * * @param Event $anEvent the event to publish */ public function publish(EventInterface $anEvent) { foreach ($this->initQueue($anEvent->eventType(), []) as $handler) { $handler($anEvent); } foreach ($this->initQueue() as $handler) { $handler($anEvent); } }