Dispatch event to the data providers.

@param $eventName
@param $params
506318
public function dispatch($eventName, $params)
    {
        if (isset($this->enabledProviderListeners[$eventName])) {
            foreach ($this->enabledProviderListeners[$eventName] as $callback) {
                call_user_func_array($callback, $params);
            }
        }
    }
1253772
public function on(string $eventName, BaseEvent $data)
    {
        return $this->c->ed->dispatch($eventName, $data);
    }
330225
protected function publish($resource, $event, array $params=[])
    {
        $eventName = $this->eventName("$resource.$event");

        $this->callOnListeners($eventName, $params);
    }
897940
protected function triggerMethod($eventName, Event $event)
    {
        $method = sprintf('on%s', Container::camelize(str_replace('.', '_', $eventName)));

        if(is_callable([$this, $method])) {
            call_user_func_array([$this, $method], [$event]);
        }

        if($event->isPropagationStopped()){
            return $event;
        }

        $this->getDispatcher()->dispatch($eventName, $event);

        return $event;
    }
1344142
private function triggerEvent($eventName, $data)
    {
        if(isset($this->eventHandlers[$eventName]))
        {
            $args = func_get_args();
            array_shift($args);

            foreach ($this->eventHandlers[$eventName] as $callback)
            {
                $clone = $args;
                call_user_func_array($callback, $clone);
            }
        }
    }
849760
public function notifyUntil($eventName, array $params = array(), $callback = null)
    {
        $this->dispatcher->notifyUntil($e = $this->createEvent($eventName, $params), $callback);
        return $e;
    }
984746
public function dispatch($eventName, Eresus_Event $event = null)
    {
        if (!array_key_exists($eventName, $this->listeners))
        {
            return;
        }

        if (null === $event)
        {
            $event = new Eresus_Event();
        }

        $event->setName($eventName);

        krsort($this->listeners[$eventName]);

        foreach ($this->listeners[$eventName] as $listeners)
        {
            foreach ($listeners as $listener)
            {
                call_user_func($listener, $event);
                if ($event->isPropagationStopped())
                {
                    break 2;
                }
            }
        }
    }
619679
public function removeListener(string $eventName, $listener): void
    {
        $this->dispatcher->removeListener($eventName, $listener);
    }
935595
public function trigger($eventName, array $params = []) {
        $event = clone $this->event;
        $event->setName($eventName);

        // Add optional extra arguments
        foreach ($params as $key => $value) {
            $event->setArgument($key, $value);
        }

        // Fetch current user
        $user = $event->getRequest()->getUser();

        // Trigger all listeners for this event and pass in the event instance
        foreach ($this->getListenersForEvent($eventName) as $listener) {
            $event->setArgument('handler', $listener['handler']);
            $callback = $this->getHandlerInstance($listener['handler']);

            if ($callback instanceof ListenerInterface) {
                $callback = [$callback, $listener['method']];
            }

            $users = $listener['users'];

            if (!$this->triggersFor($user, $users)) {
                continue;
            }

            $callback($event);

            if ($event->isPropagationStopped()) {
                break;
            }
        }

        return $this;
    }
419570
protected function dispatchEvent($eventName, \Symfony\Component\EventDispatcher\Event $event)
    {
        if (!$event->isPropagationStopped()) {
            $dispatcher = $this->getEventDispatcher();
            $dispatcher->dispatch($eventName, $event);
        }
        return !$event->isPropagationStopped();
    }
188255
public function dispatchAsyncListenersOnly($eventName, Event $event = null)
    {
        try {
            $this->asyncListener->syncMode($eventName);

            parent::dispatch($eventName, $event);
        } finally {
            $this->asyncListener->resetSyncMode();
        }
    }
155171
public function dispatch($event, array $param = [])
    {
        foreach ($this->listeners[$event] as $listener) {
            \call_user_func_array($listener, $param);
        }
    }
228708
protected function bindPatterns($eventName)
    {
        if (isset($this->syncedEvents[$eventName])) {
            return;
        }

        foreach ($this->patterns as $eventPattern => $patterns) {
            foreach ($patterns as $pattern) {
                if ($pattern->test($eventName)) {
                    $pattern->bind($this->dispatcher, $eventName);
                }
            }
        }

        $this->syncedEvents[$eventName] = true;
    }
718682
public void dispatchEvent(Event event, String eventName) {
    int typeInt = Event.getTypeInt(eventName);
    Object[] handlerData = $(element).data(EVENT_DATA);
    for (int i = 0, l = elementEvents.length(); i < l; i++) {
      BindFunction listener = elementEvents.get(i);
      String namespace = JsUtils.prop(event, "namespace");
      boolean matchEV = listener != null && (listener.hasEventType(typeInt) || listener.isTypeOf(eventName));
      boolean matchNS = matchEV && (isNullOrEmpty(namespace) || listener.nameSpace.equals(namespace));
      if (matchEV && matchNS) {
        if (!listener.fire(event, typeInt, eventName, handlerData)) {
          event.stopPropagation();
          event.preventDefault();
        }
      }
    }
  }
389628
private function sortListeners($eventName)
    {
        $this->sorted[$eventName] = array();

        if (isset($this->listeners[$eventName])) {
            krsort($this->listeners[$eventName]);
            $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]);
        }
    }
831701
private function sortListeners(string $eventName)
	{
        $listeners = &$this->listeners[$eventName];

		\krsort($listeners);
		$this->sorted[$eventName] = \array_merge(...$listeners);
	}
1098764
public function fire($name, $params = [])
    {
        if ($this->prefixEventName === null) {
            $reflector = new \ReflectionClass($this);
            $this->prefixEventName = 'e' . $reflector->getShortName();
        }
        
        $event = new Event($params);
        if (method_exists($this, $this->prefixEventHandler . $name)) {
            call_user_func([$this, $this->prefixEventHandler . $name], $event);
        }
        Yii::$app->trigger($this->prefixEventName . ucfirst($name), $event);
    }