/** * {@inheritDoc} */ public function dispatchEvent(Event $event, $band = null) { $eventName = $this->getBandEventName($event->getName(), $band); $symfonyEvent = $event instanceof SymfonyEvent ? $event : new SymfonyEventWrapper($event); $this->dispatcher->dispatch($eventName, $symfonyEvent); return !$symfonyEvent->isPropagationStopped(); }
/** * @param callable $callback * @param Event $event * @param \Exception $previous */ public function __construct($callback, Event $event, \Exception $previous) { $this->callback = $callback; $this->event = $event; parent::__construct(sprintf('Exception while executing "%s" event callback "%s"', $event->getName(), $this->getCallbackAsString()), 0, $previous); }
/** * @param Event $event * @param string $reason * @param \Exception|null $previous */ public function __construct(Event $event, $reason, \Exception $previous = null) { $this->event = $event; parent::__construct(sprintf('Can not convert event "%s": %s', $event->getName(), $reason), 0, $previous); }
/** * Constructor * * @param Event $event Serialized object * @param string $reason Error reason * @param \Exception|null $previous Previous exception */ public function __construct(Event $event, $reason, \Exception $previous) { $this->event = $event; parent::__construct(sprintf('Event "%s" of class "%s" is unsupported by serializer: %s', $event->getName(), get_class($event), $reason), $previous); }