Send an event to a backend

@param Event $event
519201
public function send(Event $event)
    {
        $message = $this->getEventMessage($event);
        $this->flush($message);
    }
363059
public function publish(Event $event)
    {
        $value = $this->serializer->serialize($event);

        return (bool) $this->client->rpush($this->queue_name, [$value]);
    }
785891
public function onRequestBeforeSend(Event $event)
    {
        $request = $event['request'];

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

        return $this->config['accept-header'];
    }
434527
public function dispatchEvent($event, ...$arguments)
    {
        $this->dispatchEventToEventCallbacks($event, $arguments);

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

        $this->logger->log($level, $message, $tags);
    }
122082
public static function onFlushPage(Event $event)
    {
        $page = $event->getTarget();
        if (!($page instanceof Page)) {
            return;
        }

        $maincontent = $event->getEventArgs();
        if (!($maincontent instanceof AbstractClassContent)) {
            $maincontent = null;
        }

        $dispatcher = $event->getDispatcher();
        $application = $dispatcher->getApplication();

        if (self::updateUrl($application, $page, $maincontent)) {
            $descendants = $application->getEntityManager()
                    ->getRepository('BackBee\NestedNode\Page')
                    ->getDescendants($page, 1);
            foreach ($descendants as $descendant) {
                self::updateUrl($application, $descendant);
            }
        }
    }
69410
public function onRequestSent(Event $event)
    {
        $request = $event['request'];
        $response = $event['response'];

        if ($request->getParams()->get('cache.hit') === null &&
            $this->canCache->canCacheRequest($request) &&
            $this->canCache->canCacheResponse($response)
        ) {
            $this->storage->cache($request, $response);
        }

        $this->addResponseHeaders($request, $response);
    }
701460
public function addEventToList(Event $event)
    {
        if ($this->_eventList) {
            $this->_eventList->add($event);
        }

        return $this;
    }
414300
public function onRequestBeforeSend(Event $event)
    {
        $request = $event['request'];
        $timestamp = $this->getTimestamp($event);

        $url = $request->getUrl(true);
        $url->getQuery()->add('ts', $timestamp);

        $body = '';
        $path = sprintf('%s?%s', $url->getPath(), (string) $url->getQuery());

        if ($request instanceof EntityEnclosingRequest) {
            $body = $request->getBody();
        }

        $signature = $this->signer->getSignature($request->getMethod(), $path, $body);

        $request->setUrl($url);
        $request->setHeader('Content-Type', 'application/json');
        $request->setHeader('X-Leetchi-Signature', $signature);
    }
1159073
public static function onInclude(Event $event)
    {
        $dispatcher = $event->getDispatcher();
        if (null !== $dispatcher->getApplication()) {
            if (null === $em = $dispatcher->getApplication()->getEntityManager()) {
                return;
            }

            $shortClassname = AbstractClassContent::getShortClassname($event->getTarget());
            $fullClassname = AbstractClassContent::getFullClassname($event->getTarget());
            foreach (class_parents($fullClassname) as $classname) {
                $em->getClassMetadata($classname)->addDiscriminatorMapClass($shortClassname, $fullClassname);

                if ('BackBee\ClassContent\AbstractClassContent' === $classname) {
                    break;
                }
            }
        }
    }
394346
function sendEvent(event) {
  var message = JSON.stringify(event);

  console.log('ws -> send: ' + message);

  var clients = serverMode ? wss.clients : [ws];

  for (var i = 0; i < clients.length; i++) {
    clients[i].send(message);
  }
}
330225
protected function publish($resource, $event, array $params=[])
    {
        $eventName = $this->eventName("$resource.$event");

        $this->callOnListeners($eventName, $params);
    }
881764
function handle(Event $event)
    {
        if ($this->accept($event)) {
            $this->onEvent($event);
            return true;
        }

        return false;
    }
880023
public void sendEvent(EventBuilder eventBuilder) {
        if (!Util.isNullOrEmpty(release)) {
            eventBuilder.withRelease(release.trim());
            if (!Util.isNullOrEmpty(dist)) {
                eventBuilder.withDist(dist.trim());
            }
        }

        if (!Util.isNullOrEmpty(environment)) {
            eventBuilder.withEnvironment(environment.trim());
        }

        if (!Util.isNullOrEmpty(serverName)) {
            eventBuilder.withServerName(serverName.trim());
        }

        for (Map.Entry<String, String> tagEntry : tags.entrySet()) {
            eventBuilder.withTag(tagEntry.getKey(), tagEntry.getValue());
        }

        for (Map.Entry<String, Object> extraEntry : extra.entrySet()) {
            eventBuilder.withExtra(extraEntry.getKey(), extraEntry.getValue());
        }

        runBuilderHelpers(eventBuilder);
        Event event = eventBuilder.build();
        sendEvent(event);
    }
1318203
public function onPostBind($event)
    {
        $form = $event->getForm();

        if ( ! $form->isRoot()) return;

        $clientData = $event->getForm()->getData();

        if ( ! is_object($clientData)) return;

        $this->filterService->filterEntity($clientData);

    }
752510
def send_to_backends(self, event):
        

        for name, backend in six.iteritems(self.backends):
            try:
                backend.send(event)
            except Exception:  # pylint: disable=broad-except
                LOG.exception(
                    'Unable to send event to backend: %s', name
                )
267410
public function publish(\Caridea\Event\Event $event)
    {
        foreach (iterator_to_array($this->listeners) as $listener) {
            $listener->notify($event);
        }
    }