Dispatch the given Event to all suitable listeners.

@param string $target method
435863
public function dispatchEvent(Swift_Events_EventObject $evt, $target)
    {
        $this->prepareBubbleQueue($evt);
        $this->bubble($evt, $target);
    }
510639
public function dispatchEvent(String $eventId, $subscriber=null)
	{
		if (isset(EventManager::$listeners[$eventId])) {
			foreach(EventManager::$listeners[$eventId] as $listener) {
				call_user_func_array($listener, [$subscriber]);
			}
		}
	}
842104
public function setTarget($target)
    {
        if (Format::isIdentifier($target)) {
            $this->target = $target;
        } else {
            $msg = "'${target}' is not a valid QTI identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
646944
function makeEventTarget(target) {
    var listeners = {};
    target.on = function(event, func) {
      if (listeners[event]) {
        listeners[event].push(func);
      } else {
        listeners[event] = [func];
      }
    };
    target.fireEvent = function(event, data) {
      expect(target.on).toHaveBeenCalledWith(event, jasmine.any(Function));
      listeners[event].forEach(function(listener) {
        listener(data);
      });
    };
    target.removeListeners = function() {
      listeners = {};
    };
    spyOn(target, "on").and.callThrough();
  }
561131
public function dispatch($data) 
    {

        $event = new \Moxy\Event($this->_name, $data);

        foreach($this->_listeners as $listener) {
            $listener->call($event);
        }

    }
98161
public function registerEventListeners(DispatcherContract $events)
    {
        foreach ($this->listen as $event => $listeners) {
            $defaultPriority = 0;
            if (!is_array($listeners)) {
                $events->listen($event, $listeners);
                continue;
            }
            foreach ($listeners as $listener => $priority) {
                if (is_numeric($listener)) {
                    $listener = $priority;
                    $priority = $defaultPriority;
                }
                if (is_array($listener)) {
                    $priority = is_numeric(current($listener)) ? current($listener) : $defaultPriority;
                    $listener = key($listener);
                }
                $events->listen($event, $listener, $priority);
            }
        }
        foreach ($this->subscribe as $subscriber) {
            $events->subscribe($subscriber);
        }
    }
449039
public function validateTargetUpdateStruct(Target $target, TargetUpdateStruct $targetUpdateStruct): void
    {
        $targetType = $target->getTargetType();

        $this->validate(
            $targetUpdateStruct->value,
            $targetType->getConstraints(),
            'value'
        );
    }
901792
public function dispatch(EventInterface $event)
    {
        if (array_key_exists($event->getName(), $this->listeners)) {
            foreach ($this->listeners[$event->getName()] as $listener) {
                $listener($event);
            }
        }

        return $event;
    }
1186303
protected function dispatchAssociationActionEvent($entity, $action, $target, $eventName)
    {
        $event = new AdminAssociationActionEvent($entity, $action, $target, $this->getUser());
        $this->get('event_dispatcher')->dispatch($eventName, $event);

        return $event;
    }
616687
function setTarget($target)
    {
        if (!$target instanceof aSapi)
            throw new \InvalidArgumentException(sprintf(
                'Application Target Must Instanceof aSapi; given: (%s).'
                , \Poirot\Std\flatten($target)
            ));

        parent::setTarget($target);
        return $this;
    }
405053
public function dispatch($event, $eventContext = null)
    {
        if (false === isset($this->listeners[$event])) {

            return;
        }

        foreach ($this->listeners[$event] as $callback) {
            call_user_func($callback, $eventContext);
        }
    }
511841
public function handle(KernelHandleInterface $target, Request $request) {
		$event = new KernelHandleEvent($target);

		$this->dispatcher->dispatch(KernelHandleEvent::PRE_RUN, $event);
		$response = $target->run($request);
		$this->dispatcher->dispatch(KernelHandleEvent::POST_RUN, $event);

		return $response;
	}
1079629
public function clover(string $target)
    {
        $clover = new Clover();
        $clover->process($this->coverage, $target);
    }
835573
public function dispatch($event, Event $eventObject)
    {
        if (!isset($this->listeners[$event])) {
            return;
        }
        
        foreach ($this->listeners[$event] as $listener) {
            call_user_func_array($listener, array($eventObject));
            
            if ($eventObject->propagationHalted()) {
                break;
            }
        }
    }
1175663
protected function dispatch(IncomingMessage $message)
    {
        foreach ($this->eventListeners as $data) {
            $listener = $data[0];
            $predicate = $data[1];
            if (is_callable($predicate) && !call_user_func($predicate, $message)) {
                continue;
            }
            if ($listener instanceof \Closure) {
                $listener($message);
            } elseif (is_array($listener)) {
                $listener[0]->{$listener[1]}($message);
            } else {
                $listener->handle($message);
            }
        }
    }
730796
private void bind(IActionTarget target) {
        if (targets.isEmpty()) {
            getEventManager().subscribe(eventName, this);
        }
        
        targets.add(target);
    }
388540
protected void dispatchEvent (int remoteOid, DObject target, DEvent event)
    {
        try {
            // apply the event to the object
            boolean notify = event.applyToObject(target);

            // if this is an object destroyed event, we need to remove the object from our table
            if (event instanceof ObjectDestroyedEvent) {
//                 Log.info("Pitching destroyed object [oid=" + remoteOid +
//                          ", class=" + StringUtil.shortClassName(target) + "].");
                _ocache.remove(remoteOid);
            }

            // have the object pass this event on to its listeners
            if (notify) {
                target.notifyListeners(event);
            }

        } catch (Exception e) {
            log.warning("Failure processing event", "event", event, "target", target, e);
        }
    }