Notifies listeners about an event.

@param string $event     The unique name of the event.
@param array  $arguments Arguments for event callbacks.
481654
public function notify(string $event, array $arguments = null)
    {
        if (isset($this->events[$event])) {
            foreach ($this->events[$event] as $priorityKey => $callbackKey) {
                $output = $this->subscriptions[$callbackKey]($this, $arguments ?? []);
                if (isset($output['stop']) && true === $output['stop']) {
                    break;
                }
            }
        }
    }
82128
public function triggerEvent($event, $args = [])
    {
        /** @var \Windwalker\Event\Dispatcher $dispatcher */
        $dispatcher = $this->container->get('dispatcher');

        $dispatcher->triggerEvent($event, $args);

        return $event;
    }
1039764
public function emit($event, array $arguments = [])
    {
        parent::emit($event, $arguments);
        if ($this->broker) {
            $this->broker->emit($event, $arguments);
        }
    }
1064232
public function emit($event, ...$parameters)
    {
        $event = $this->ensureEvent($event);
        $event->setEmitter($this);
        $event->setContexts($parameters);

        $listeners = $this->getListeners($event);

        foreach ($listeners as $listener) {
            $listener->handle($event);
        }

        unset($listeners, $event);
    }
1287203
public function emit($event, $args=null)
    {
        $listers_of_event = isset($this->listeners[$event]) ? $this->listeners[$event] : null;
        if ($listers_of_event){
            foreach ($listers_of_event as $listener){
                call_user_func($listener,$args,$event);
            }
        }
    }
267410
public function publish(\Caridea\Event\Event $event)
    {
        foreach (iterator_to_array($this->listeners) as $listener) {
            $listener->notify($event);
        }
    }
452413
public function handleEvent($event, array $args)
    {
        $logger = $this->getLogger();

        $eventObjects = array_filter($args, function($arg) {
            return $arg instanceof EventInterface;
        });
        if (!$eventObjects) {
            $logger->info('Event emitted without EventInterface argument', array(
                'event' => $event,
                'args' => $args,
            ));
        } else {
            $eventObject = reset($eventObjects);
            if ($this->filter->filter($eventObject) === false) {
                $logger->info('Event did not pass filter, skipping', array(
                    'event' => $event,
                    'args' => $args,
                ));
                return;
            } else {
                $logger->info('Event passed filter, forwarding', array(
                    'event' => $event,
                    'args' => $args,
                ));
            }
        }

        $callbacks = $this->getEventHandlers($event);
        foreach ($callbacks as $callback) {
            $logger->info('Forwarding event to callback', array(
                'event' => $event,
                'args' => $args,
                'callback' => $callback,
            ));
            call_user_func_array($callback, $args);
        }
    }
918460
public function emit($event, array $arguments = [])
    {
        foreach ($this->anyListeners as $listener) {
            call_user_func_array($listener, [$event , $arguments]);
        }

        parent::emit($event, $arguments);
    }
506072
protected function _proxyEvent($event, $args = array())
    {
        //Publish the event
        if (class_exists('Koowa')) {
            KObjectManager::getInstance()->getObject('event.publisher')->publishEvent($event, $args, JFactory::getApplication());
        }
    }
244317
public function onCommand($event)
    {
        $this->data['commands'][] = array(
            'command' => $event->getCommand(),
            'arguments' => $event->getArguments(),
            'executiontime' => $event->getExecutionTime(),
        );
    }
544285
public function notify($arguments = null)
	{
		foreach ($this->observers as $observer) {
			$observer->update($this, $arguments);
		}
	}
437817
public function addListener(string $event, $listener)
    {
        if (!isset($this->listeners[$event])) {
            $this->listeners[$event] = [];
        }
        $this->listeners[$event][] = $listener;
    }
955190
protected function execute($event)
    {
        foreach($this->events[$event] as $handler) {
            $this->listen($event, $handler);
        }
    }
760104
protected function trigger ($event)
	{
		$arguments = func_get_args ();
		array_shift ($arguments);

		// Check for events
		if (isset ($this->events[$event]))
		{
			foreach ($this->events[$event] as $call)
			{
				call_user_func_array ($call, $arguments);
			}
		}

		// Notify everyone
		foreach ($this->observing as $observer)
		{
			$observer->update ();
		}
	}
1156954
public function fire(string $event, ...$args): void
    {
        if (!isset(self::$events[$event])) {
            return;
        }

        // call event handlers of the event.
        foreach ((array)self::$eventHandlers[$event] as $cb) {
            // return FALSE to stop go on handle.
            if (false === PhpHelper::call($cb, ...$args)) {
                break;
            }
        }

        // is a once event, remove it
        if (self::$events[$event]) {
            $this->off($event);
        }
    }
55475
public function fireReturn(string $event, array $arguments = null) {
        return $this->getEventManager()->fireReturn($event, $arguments);
    }
141971
public function notify( $event )
	{
		if ( ! isset( $event['section'] ) || ! isset( $event['source'] ) ) return;
		$source = $event['section'];

		$source = array( 'message' => $event['message'], 'details' => $event['source'] );
		$this->addSection( $event['section'], $source );
	}