Fire the given event if a dispatcher is bound.

@param  string  $queue
@param  mixed  $event
@return void
323324
protected function event($queue, $event)
    {
        if ($this->container && $this->container->bound(Dispatcher::class)) {
            $queue = Str::replaceFirst('queues:', '', $queue);

            $this->container->make(Dispatcher::class)->dispatch(
                $event->connection($this->getConnectionName())->queue($queue)
            );
        }
    }
10605
public void fire(StepStartedEvent event) {
        Step step = new Step();
        event.process(step);
        stepStorage.put(step);

        notifier.fire(event);
    }
979270
protected function fireEvent($event, $payload = [ ], $halt = false)
    {
        if (! isset($this->dispatcher)) {
            $this->initEventDispatcher();
        }

        $dispatcher = $this->dispatcher;
        $status     = $this->dispatcherStatus;
        if (! $dispatcher || $status === false) {
            return;
        }
        $method = $halt ? 'until' : 'fire';

        return $dispatcher->{$method}($event, $payload);
    }
347354
private function dispatchEvent($em, $event)
    {
        $eventArgs = new LifecycleEventArgs(null, $em);

        $em->getEventManager()
           ->dispatchEvent($event, $eventArgs);
    }
810820
public function fireEvent(string $event): void
    {
        $this->log->debug('Event {event} has been fired.', ['event' => $event]);
        foreach ($this->event_handlers as $handler) {
            /** @var EventHandler $handler */
            if ($event === $handler->getEvent()) {
                $handler->execute();
            }
        }
    }
726763
protected function dispatch($event) {
        if (empty($event['type'])) {
            $this->logger->warning('wrong event type, maybe something wrong');

            return false;
        }

        if (strpos($event['type'], ':') === false) {
            $event['type'] .= ':handleEvent';
        }

        try {
            $this->eventsManager->fire($event['type'], $this, $event['data']);
        } catch (\Exception $e) {
            $this->logger->warning('dispatch event exception while subscribing event queue', ['code' => $e->getCode(), 'msg' => $e->getMessage(), 'trace' => $e->getTrace()]);
        } finally {
            $this->mq->confirm($event, Queue::CONFIRM_SUCC);
        }

        return true;
    }
691750
private void fireEvent(RecorderEventImpl event) {
        eventSender.event = event;
        scheduler.submit(eventSender, PriorityQueueScheduler.INPUT_QUEUE);
    }
476204
public function handleQuit(UserEvent $event, Queue $queue)
    {
        $nick = $event->getNick();
        if ($this->primaryNick !== null && $nick == $this->primaryNick) {
            $this->logger->debug("[AltNick] '$nick' disconnected, switching to primary nick");
            $queue->ircNick($this->primaryNick);
            $this->primaryNick = null;
        }
    }
808751
synchronized void fireEvent(final Event<?> event) {
        final String eventType = event.getType();
        List<Event<?>> events = synchronizedEvents.get(eventType);
        if (null == events) {
            events = new ArrayList<>();
            synchronizedEvents.put(eventType, events);
        }

        events.add(event);
        setChanged();
        notifyListeners(event);
    }
405053
public function dispatch($event, $eventContext = null)
    {
        if (false === isset($this->listeners[$event])) {

            return;
        }

        foreach ($this->listeners[$event] as $callback) {
            call_user_func($callback, $eventContext);
        }
    }
514116
public function fireEvent($event, $resource, $path)
    {
        if ($this->eventWasProcessed($event, $resource, $path)) {
            return;
        }

        $this->showEventMessage($event, $path);

        if ($this->isConfig($path)) {
            return;
        }

        if ($this->firedOnlyOne($event, $path)) {
            return;
        }

        $this->loader->loadEverything();

        if ($this->queueTestSuites($path)) {
            return;
        }

        $this->dataRepository->queueAllTests();
    }
84793
public static function fire($job, $data)
    {

        \Log::info('Queue job called #' . $job->getJobId(), Arr::toArray($data));

        $method = $data['@method'];

        unset($data['@method']);

        $t = self::getInstance();

        call_user_func_array(array($t, $method), $data);

        $job->delete();
    }
316921
protected function fireConnectionEvent($event)
	{
		if (isset($this->events))
		{
			$this->events->fire('connection.'.$this->getName().'.'.$event, $this);
		}
	}
118653
public function dispatch( $event, $dispatchContext = null ) {

		$event = strtolower( $event );

		if ( !$this->hasEvent( $event ) && $this->throwOnMissingEvent ) {
			throw new EventNotDispatchableException( $event );
		} elseif( !$this->hasEvent( $event ) ) {
			return;
		}

		if ( is_array( $dispatchContext ) ) {
			$dispatchContext = DispatchContext::newFromArray( $dispatchContext );
		}

		foreach ( $this->dispatchableListeners[$event] as $listener ) {

			$listener->execute( $dispatchContext );

			if ( $listener->isPropagationStopped() || ( $dispatchContext !== null && $dispatchContext->isPropagationStopped() ) ) {
				break;
			}
		}
	}
831194
public function handleDnsCommand(CommandEventInterface $event, EventQueueInterface $queue)
    {
        if (get_class($event) !== '\Phergie\Irc\Plugin\React\Command\CommandEvent' &&
            get_class($event) !== 'Phergie\Irc\Plugin\React\Command\CommandEvent' &&
            !is_subclass_of($event, '\Phergie\Irc\Plugin\React\Command\CommandEvent')
        ) {
            throw new \BadMethodCallException(
                get_class($event) . ' given, expected: Phergie\Irc\Plugin\React\Command\CommandEvent'
            );
        }

        foreach ($event->getCustomParams() as $hostname) {
            $this->logDebug('Looking up: ' . $hostname);
            $this->resolveDnsQuery(
                new Query(
                    $hostname,
                    function ($ip, $hostname) use ($event, $queue) {
                        $message = $hostname . ': ' . $ip;
                        $this->logDebug($message);
                        foreach ($event->getTargets() as $target) {
                            $queue->ircPrivmsg($target, $message);
                        }
                    },
                    function ($error, $hostname) use ($event, $queue) {
                        $message = $hostname . ': error looking up hostname: ' . $error->getMessage();
                        $this->logDebug($message);
                        foreach ($event->getTargets() as $target) {
                            $queue->ircPrivmsg($target, $message);
                        }
                    }
                )
            );
        }
    }
372186
protected function fire($listeners, $event): void
    {
        ksort($listeners);
        foreach ($listeners as $list) {
            foreach ($list as $listener) {
                $result = $listener($event);
                if (null === $result) {
                    // continue;
                } elseif (false === $result) {
                    break 2;
                } else {
                    $event->setTarget($result);
                }
            }
        }
    }
496240
public function setEventQueue(Event $event, Queue $queue)
    {
        $mask = $this->getConnectionMask($event->getConnection());
        $this->getEventQueueDeferred($mask)->resolve($queue);
    }