You are here

public function Psr14Bridge::dispatch in Search API Solr 8

Same name and namespace in other branches
  1. 4.x src/Solarium/EventDispatcher/Psr14Bridge.php \Drupal\search_api_solr\Solarium\EventDispatcher\Psr14Bridge::dispatch()

Overrides ContainerAwareEventDispatcher::dispatch

File

src/Solarium/EventDispatcher/Psr14Bridge.php, line 23

Class

Psr14Bridge
A helper to decorate the legacy EventDispatcherInterface::dispatch().

Namespace

Drupal\search_api_solr\Solarium\EventDispatcher

Code

public function dispatch($event, Event $null = NULL) {
  if (\is_object($event)) {
    return $this->dispatcher
      ->dispatch(\get_class($event), new EventProxy($event));
  }
  return $this->dispatcher
    ->dispatch($event, $null);
}