Publish event to queue.

@param Event $event

@return bool
166001
public function publish(Event $event)
    {
        // absence of a handlers is not a error
        foreach ($this->handlers as $handler) {
            call_user_func($handler, $event);
        }

        return true;
    }
913138
public function hasListener($event): bool
    {
        $name = $this->getEventName($event);

        if (isset($this->listeners[$name])) {
            foreach ($this->listeners[$name] as $listeners) {
                if (count($listeners) > 0) {
                    return true;
                }
            }
        }

        unset($name);

        return false;
    }
1197650
public function startup(Event $event)
    {
        if (!$this->_isFilterRequest()) {
            return true;
        }

        $this->_initFilterOptions();

        if ($this->request->is('post')) {
            $this->_extractPassParams();

            $url = ['action' => $this->action];

            $url = $this->_applyFilterData($url);
            $url = $this->_applyPassedParams($url);
            $url = $this->_applySort($url);

            $this->controller->redirect($url);
            return false;
        }

        return true;
    }
1015274
protected function create(Event $event)
    {
        $this->dispatch(static::EVENT_CREATE_BEFORE, $event);
        if (!$event->isPropagationStopped()) {
            $this->createProcess($event);
            if (!$event->isPropagationStopped()) {
                $this->dispatch(static::EVENT_CREATE_AFTER, $event);
            }
        }
    }
55422
public function dispatch(Event $event): Event
    {
        return $this->getRouter()->route(new Context($event->name(), $event));
    }
1263959
public function publishSuccess(Event $event)
    {
        if (!isset($event->getSubject()->success)) {
            return false;
        }

        $this->_controller()->set('success', $event->getSubject()->success);
    }
998897
public function fireEvent($event)
    {
        $handle = $this->getQualifiedEvent($event);

        // Fire the event
        /** @var \League\Event\EventInterface $event */
        $event = $this->explainer->displayBelow(function () use ($handle) {
            return $this->events->emit($handle, [$this]);
        });

        // If the event returned a strict false, halt the task
        $wasHalted = $event && $event->isPropagationStopped();
        if ($wasHalted && $event !== 'halt' && method_exists($this, 'halt')) {
            $this->halt();
        }

        return !$wasHalted;
    }
496240
public function setEventQueue(Event $event, Queue $queue)
    {
        $mask = $this->getConnectionMask($event->getConnection());
        $this->getEventQueueDeferred($mask)->resolve($queue);
    }
64092
public function publish()
    {
        if (empty($this->handlers)) {
            return false;
        }

        foreach ($this->handlers as $handler) {
            $handler->handle($this->eventData);
        }
        return true;
    }
881764
function handle(Event $event)
    {
        if ($this->accept($event)) {
            $this->onEvent($event);
            return true;
        }

        return false;
    }
267410
public function publish(\Caridea\Event\Event $event)
    {
        foreach (iterator_to_array($this->listeners) as $listener) {
            $listener->notify($event);
        }
    }
771521
public function handleServiceEvent($event)
    {
        Log::debug('Service event handled: ' . $event->name);

        if ($script = $this->getEventScript($event->name)) {
            Log::debug('Service event script found: ' . $event->name);
            $data = $event->makeData();

            if (null !== $result = $this->handleEventScript($script, $data)) {
                return $this->handleEventScriptResult($script, $result);
            }
        } elseif ($script = $this->getEventScript($event->name . '.queued')) {
            Log::debug('Queued service event script found: ' . $event->name);
            $result = $this->dispatchNow(new ServiceEventScriptJob($event->name . '.queued', $event, $script->config));
            Log::debug('Service event queued: ' . $event->name . PHP_EOL . $result);
        }

        return true;
    }
1100231
public function send(Event $event)
    {
        $level = $this->getEventLevel($event);
        $message = $this->getEventMessage($event);
        $tags = $this->getEventTags($event);

        $this->logger->log($level, $message, $tags);
    }
1374373
public static function emit($event)
    {
        if (isset(static::$events['__bow.once.event'][$event])) {
            $listener = static::$events['__bow.once.event'][$event];

            $data = array_slice(func_get_args(), 1);

            return $listener->call($data);
        }

        if (!static::bound($event)) {
            return false;
        }

        if (isset(static::$events[$event])) {
            $events = static::$events[$event];
        } else {
            $events = static::$events['__bow.transmission.event'][$event];
        }

        $listeners = new Collection($events);

        $data = array_slice(func_get_args(), 1);

        $listeners->each(function (Listener $listener) use ($data) {

            if ($listener->getActionType() === 'string') {
                $callable = $listener->getAction();
            } else {
                $callable = [$listener, 'call'];
            }

            return Actionner::getInstance()->execute($callable, [$data]);
        });

        return true;
    }
517080
private function getHandlerQueue($event)
    {
        if (!isset($this->handlers[$event])) {
            $this->handlers[$event] = new Priority;
        }

        return $this->handlers[$event];
    }
274190
public function listenersOfEvent(Event $event)
    {
        $event_name = get_class($event);

        return isset($this->listeners[$event_name]) ? $this->listeners[$event_name] : [];
    }
427747
public function publish(EventInterface $event)
    {
        $commandsToDispatch = $this->eventBus->publish($event);

        $commands = $this->extractCommands($commandsToDispatch);
        foreach ($commands as $command) {
            $this->dispatch($command);
        }
    }