Trigger an event, possibly with parameters.
@param $event
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 ();
		}
	}
1139123
public function triggerEvent($event)
	{
		if (!($event instanceof EventInterface))
		{
			if (isset($this->events[$event]))
			{
				$event = $this->events[$event];
			}

			else
			{
				$event = new Event($event);
			}
		}

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

				if ($listener instanceof Closure)
				{
					call_user_func($listener, $event);
				}

				else
				{
					call_user_func(array($listener, $event->getName()), $event);
				}
			}
		}

		return $event;
	}
666787
final protected static function triggerEvent($event, array $context = array())
	{
		if (array_key_exists($event, static::$registered_events)) {
			array_map(function($handler) use ($context)
			{
				call_user_func($handler, $context);
			}, static::$registered_events[$event]);
		}
	}
634033
public function fire($event)
    {
        $this->dispatch("$event.before");
        $this->dispatch($event);
        $this->dispatch("$event.after");

        return $this;
    }
117963
public function on ($event, callable $callback)
	{
		if (!isset ($this->events[$event]))
		{
			$this->events[$event] = array ();
		}
		$this->events[$event][] = $callback;
	}
677241
public function handle(Registered $event)
    {
        if ($event->user instanceof MustVerifyEmail && ! $event->user->hasVerifiedEmail()) {
            $event->user->sendEmailVerificationNotification();
        }
    }
842420
def trigger (self, event, *args, **kwargs):
        
        if self._events.has_key(event):
            for _callback in self._events[event]:
                try:
                    _callback(args, kwargs)
                except TypeError:
                    _callback()
1221171
public function sendEvent($event, $params = array()){
		
		if(isset ($this->actions[$event])){
			foreach ($this->actions[$event] as $eventO){
				$eventO->doEvent($params);
			}
		}
	}
320982
public function triggerEvent($event, $args = [])
    {
        if (!is_string($event) && !$event instanceof Event) {
            throw new \InvalidArgumentException(sprintf(
                '%s::%s only allow Event object or string.',
                get_called_class(),
                __FUNCTION__
            ));
        }

        if (!($event instanceof Event)) {
            if (isset($this->events[$event])) {
                $event = $this->events[$event];
            } else {
                $event = new Event($event);
            }
        }

        $event->mergeArguments($args);

        $listeners = [];

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

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

                if (!is_callable($listener)) {
                    continue;
                }

                $listener($event);

                if ($this->debug) {
                    $listeners[] = $listener;
                }
            }
        }

        if ($this->debug) {
            $executedListeners = [];

            foreach ($listeners as $listener) {
                if ($listener instanceof \Closure) {
                    $ref = new \ReflectionFunction($listener);

                    $listener = ['{Closure}: ' . $ref->getFileName() . ' - Line: ' . $ref->getStartLine()];
                }

                if (is_object($listener[0])) {
                    $listener[0] = get_class($listener[0]);
                }

                $executedListeners[] = $listener;
            }

            $this->collector[] = [
                'event' => $event->getName(),
                'listeners' => $executedListeners,
            ];
        }

        return $event;
    }
1148899
def trigger(self, event: str, *args: T.Any, **kw: T.Any) -> bool:
        """"""

        callbacks = list(self._events.get(event, []))
        if not callbacks:
            return False

        for callback in callbacks:
            callback(*args, **kw)
        return True
1180817
public function trigger($event)
    {
        if ($this->has($event)) {
            return call_user_func($this->listeners[$event]);
        } else {
            throw new RuntimeException(sprintf(
                'Cannot trigger non-existing event "%s"', $event
            ));
        }
    }
638580
public function handle($event)
    {
        if ($event instanceof CExceptionEvent)
            $this->logExceptionEvent($event);
        else
            $this->logErrorEvent($event);
        parent::handle($event);
    }
75650
function on(string $event, $callback, int $priority = 0): void
    {
        $this->getEventEmitter()->on($event, $callback, $priority);
    }
824673
public function listener(Event $event)
    {
        error_log(
            $event->context->get(0)->getRequestTarget() . PHP_EOL,
            3,
            RUNTIME_PATH . '/logs/example.log'
        );
    }
1299185
public static function event_triggered(\core\event\base $event) {
        if (self::$eventsink) {
            self::$eventsink->add_event($event);
        }
    }
202747
protected function ensureEvent($event): Event
    {
        if (Assert::instanceOf($event, '\\One\\Event\\Event')) {
            return $event;
        } elseif (Assert::string($event)) {
            return new Event($event);
        }

        throw new InvalidArgumentException(
            '`Event` must be `string` or extends class `One\Event\Event`'
        );
    }
968818
public function handleParseDate($event)
    {
        if ($event->getResult() === null) {
            /** @var Date $dateAdapter */
            $dateAdapter = $this->framework->getAdapter(Date::class);
            $event->setResult($dateAdapter->parse($event->getFormat(), $event->getTimestamp()));
        }
    }