Publish event to queue.

@param Event $event

@return bool
322763
public function publish(Event $event)
    {
        $massage = $this->serializer->serialize($event);
        $this->client->publish($this->queue_name, $massage);

        return true;
    }
88294
public function publish(Event $event)
    {
        foreach ($this->subscribers as $subscriber) {
            if ($subscriber->isSubscribedTo($event)) {
                $subscriber->handle($event);
            }
        }

        return $this;
    }
569925
public function publish(DomainEvent $event)
    {
        $subscribers = [];
        $eventType = get_class($event);

        if (isset($this->subscribers[$eventType])) {
            $subscribers += $this->subscribers[$eventType];
        }

        if (isset($this->subscribers[DomainEvent::class])) {
            $subscribers += $this->subscribers[DomainEvent::class];
        }

        foreach ($subscribers as $subscriber) {
            $subscriber->handleEvent($event);
        }
    }
347043
public function addEvent(Event $event): self
    {
        $event->setSchedule($this);
        $this->events[] = $event;

        return $this;
    }
785891
public function onRequestBeforeSend(Event $event)
    {
        $request = $event['request'];

        $request->setHeader('Accept',(string) $this->config['accept-header']);

        return $this->config['accept-header'];
    }
1175095
public function getListenerQueue($event)
    {
        if ($event instanceof EventInterface) {
            $event = $event->getName();
        }

        if (isset($this->listeners[$event])) {
            return $this->listeners[$event];
        }

        return null;
    }
817063
public function add(Event $event)
    {
        $this->doPost('/events/add', $event->toArray());

        /** @var \Fnayou\InstapushPHP\Model\Events $events */
        $events = $this->list();

        return $events->last();
    }
1007692
public function serverShouldRun(Event $event, DateTimeInterface $time)
    {
        return $this->schedulingMutex->create($event, $time);
    }
68175
protected function _write($event)
    {
        $data = array();
        if (empty($this->getColumnMap())) {
            $data = $event;
        } else {
            foreach ($this->getColumnMap() as $name => $value) {
                if (isset($event[$name])) {
                    $data[$name] = $event[$name];
                }
            }
        }

        $entry = new $this->modelClass();
        $entry->fromArray($data);
        $entry->save();

        return $this;
    }
778266
public function setWorkflowStageToPublished(PublishEvent $event)
    {
        $document = $event->getDocument();

        if (!$this->supports($event)) {
            return;
        }

        $this->setWorkflowStage($document, $event->getAccessor(), WorkflowStage::PUBLISHED, $event->getLocale(), true);
    }
828607
public function publish(string $message) : bool
    {
        $event = $this->getTimerEvent(__METHOD__);

        $return = $this->storage->publish($this->name, $message);

        $event->addData([
            'body' => $message,
        ]);

        self::emit($event);

        return $return;
    }
379588
private function listenTo($event = null) {
        if ($event === null && $this->getEventInvoker()) {
            $event = $this->getEventInvoker()['id'];
        }
        return !$this->listen || in_array($event, $this->listen);
    }
427747
public function publish(EventInterface $event)
    {
        $commandsToDispatch = $this->eventBus->publish($event);

        $commands = $this->extractCommands($commandsToDispatch);
        foreach ($commands as $command) {
            $this->dispatch($command);
        }
    }
796639
public function queue($event, $payload = array())
	{
		$me = $this;

		$this->listen($event.'_queue', function() use ($me, $event, $payload)
		{
			$me->fire($event, $payload);
		});
	}
1100231
public function send(Event $event)
    {
        $level = $this->getEventLevel($event);
        $message = $this->getEventMessage($event);
        $tags = $this->getEventTags($event);

        $this->logger->log($level, $message, $tags);
    }
119168
public function runHandler(Event $event)
    {
        if (is_callable($this->handler)) {
            return call_user_func($this->handler, $event);
        }
        return false;
    }
291870
protected function trigger($event)
    {
        $class = static::class;

        if ($this->withEvent && isset(self::$event[$class][$event])) {
            foreach (self::$event[$class][$event] as $callback) {
                $result = call_user_func_array($callback, [$this]);

                if (false === $result) {
                    return false;
                }
            }
        }

        return true;
    }