Trigger a particular event.

@param string $event
@param mixed  ...$arguments
965550
protected function trigger($event, ...$arguments)
    {
        if (!empty($this->handlers[$event])) {
            /** @var callable $handler */
            foreach ($this->handlers[$event] as $handler) {
                call_user_func_array($handler, $arguments);
            }
        }
    }
1308059
public function trigger($event)
    {
        $result = false;
        if (isset(self::$event[$event])) {
            $result = call_user_func_array(self::$event[$event], [$this]);
        }

        return $result;
    }
693210
public function trigger($name, ...$args)
    {
        if ($this->addThisToEvents) {
            array_unshift($args, $this);
        }
        if (isset($this->eventHandlers[$name])) {
            $this->lastEventName = $name;
            foreach ($this->eventHandlers[$name] as $cb) {
                if ($cb(...$args) === true) {
                    return $this;
                }
            }
        }
        return $this;
    }
1318055
public function emit($event, $args=null)
    {
        if (is_array($this->listeners)){
            foreach($this->listeners as $event_key => $listers_of_event){
                if ($event_key == $event){
                    foreach ($listers_of_event as $listener){
                        call_user_func($listener,$args,$event);
                    }
                }
                else {
                    $reg_exp = $this->getRegExp($event_key);
                    if ($reg_exp && preg_match($reg_exp,$event)){
                        foreach ($listers_of_event as $listener){
                            call_user_func($listener,$args,$event);
                        }
                    }
                }
            }
        }
        }
135416
public static function trigger($name, $args) {
        if (array_key_exists($name, static::$events)) {
            $infos = static::$events[ $name ];
            if ($infos) {
                foreach ($infos as $info) {
                    $module = Ioc::get($info[ 'class' ]);
                    if ($info[ 'action' ]) {
                        static::doAction($module, $info[ 'action' ], $args);
                    }
                }
            }
        }
    }
1354228
protected function triggerEvent($event)
    {
        $instance = static::cyrus();

        if (method_exists($instance, $event) &&
            in_array($event, $instance->getModelEvents())
        ) {
            $instance->{$event}($instance);
        }
    }
711338
function emit(string $event, ...$arguments) {
        if(!empty($this->listeners[$event])) {
            foreach($this->listeners[$event] as $listener) {
                $listener(...$arguments);
            }
        }
        
        if(!empty($this->onceListeners[$event])) {
            $listeners = $this->onceListeners[$event];
            unset($this->onceListeners[$event]);
            
            foreach($listeners as $listener) {
                $listener(...$arguments);
            }
        }
    }
941395
function trigger(eventsInput, args)
  {
    try
    {
      var events = toArray( eventsInput, ' ' );

      for (var i = 0; i < events.length; i++)
      {
        triggerListeners( this.$$on, events[ i ], args );
      }
    }
    catch (ex)
    {
      Rekord.trigger( Rekord.Events.Error, [ex] );
    }

    return this;
  }
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 ();
		}
	}
69932
public function trigger($events, $args = [])
    {
        $args[] = $this;
        if (!is_array($events)) {
            $events = [$events];
        }

        foreach ($events as $event) {
            dispatcher()->trigger(static::class . '.' . $event, $args);
            dispatcher()->trigger(Record::class . '.' . $event, $args);
        }

        return $this;
    }
747119
public function fireOff(string $event, $sender, array $arguments = null) {
        $arguments = (array)$arguments;
        array_unshift($arguments, $sender);
        return $this->fire($event, $arguments);
    }
736193
public function trigger($event, $target = null, $argv = [])
    {
        if (!$event instanceof Event) {
            $event = new Event($event, $target, $argv);
        } else {
            $event->setTarget($target);
            $event->setParams($argv);
        }

        $allListeners = [];
        if (isset($this->listeners[$event->getName()])) {
            ksort($this->listeners[$event->getName()]);
            $allListeners = array_values($this->listeners[$event->getName()]);
        }

        $result = null;
        foreach ($allListeners as $listeners) {
            foreach ($listeners as $listener) {
                $result = call_user_func($listener, $event);
                if ($event->isPropagationStopped()) {
                    break 2;
                }
            }
        }

        return $result;
    }
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);
        }
    }
1017001
public function trigger($event, $target = null, $argv = array()){
        if(!($event instanceof EventInterface)){
            $event = new Event($event, $target, $argv);
        }
        if(isset($this->listeners[$event->getName()])){
            $this->listeners[$event->getName()]->perform($event);
        }
    }
85787
public function triggerEvent($event, $args = [])
    {
        if (!($event instanceof EventInterface)) {
            if (isset($this->events[$event])) {
                $event = $this->events[$event];
            } else {
                $event = new Event($event);
            }
        }

        $event->mergeArguments($args);

        if (isset($this->listeners[$event->getName()])) {
            foreach ($this->listeners[$event->getName()] as $listener) {
                if ($event->isStopped()) {
                    return $event;
                }

                if (is_callable($listener)) {
                    call_user_func($listener, $event);
                } else {
                    call_user_func([$listener, $event->getName()], $event);
                }
            }
        }

        return $event;
    }
435547
public function fire($event_type, ...$arguments)
    {
        $event_type = (string) $event_type;

        if (isset($this->callbacks[$event_type])) {
            foreach ($this->callbacks[$event_type] as &$callback) {
                $callback(...$arguments);
            }
        }
    }
253711
public function trigger(string $event, ...$args): EventInterface
    {
        $matches = $this->match($event);

        //if there are no events found
        if (empty($matches)) {
            //report a 404
            $this->meta = self::STATUS_NOT_FOUND;
            return $this;
        }

        $observers = [];
        foreach ($matches as $match) {
            $event = $match['pattern'];

            //if no direct observers
            if (!isset($this->observers[$event])) {
                continue;
            }

            //add args on to match
            $match['args'] = $args;

            //then loop the observers
            foreach ($this->observers[$event] as $observer) {
                //get the callback
                $callback = $observer['observer']->getCallback();
                $priority = $observer['priority'];
                //add on to match
                $match['callback'] = $callback;
                $observers[$priority][] = $match;
            }
        }

        //then sort by priority
        krsort($observers);
        if (!empty($observers)) {
            $observers = call_user_func_array('array_merge', $observers);
        }

        //call the callbacks
        foreach ($observers as $match) {
            //set the current
            $this->meta = $match;

            //if this is the same event, call the method, if the method returns false
            if (call_user_func_array($match['callback'], $args) === false) {
                //report a 308
                $this->meta = self::STATUS_INCOMPLETE;
                return $this;
            }
        }

        //report a 200
        $this->meta = self::STATUS_OK;

        return $this;
    }