Calls trigger events
@param string $name factory name
@param string $type variation or fixture name
@param object|array $object
@param string $event event name
356252
protected function event($name, $type, $object, $event)
    {
        if (is_null($this->triggers)) {
            return;
        }

        $event = ucfirst($event);

        $deprecatedEvent = strtolower($event); // @deprecated Backwards compatibility

        if (method_exists($this->triggers, "{$name}{$event}")) {
            call_user_func(array($this->triggers, "{$name}{$event}"), $object);
        } elseif (method_exists($this->triggers, "{$name}_{$deprecatedEvent}")) { // @deprecated Backwards compatibility
            call_user_func(array($this->triggers, "{$name}_{$deprecatedEvent}"), $object);
        }

        if ($type) {

            $type = ucfirst($type);

            if (method_exists($this->triggers, "{$name}{$type}{$event}")) {
                call_user_func(array($this->triggers, "{$name}{$type}{$event}"), $object);
            } elseif (method_exists($this->triggers, "{$name}_{$type}_{$deprecatedEvent}")) { // @deprecated Backwards compatibility
                call_user_func(array($this->triggers, "{$name}_{$type}_{$deprecatedEvent}"), $object);
            }
        }
    }
142957
public function trigger($eventType, $params)
    {
        if (isset($this->eventList[$eventType]) && is_array($this->eventList[$eventType])) {
            foreach ($this->eventList[$eventType] as $callbackDescriptor) {
                call_user_func_array($callbackDescriptor['cb'], $params);
            }
        }
    }
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);
        }
    }
1367652
public function fireEvents(string $name, QueryObject $queryObject, array $eventArguments = []): void
    {
        $this->connection->getEventHandler()->fireEvents($name, $queryObject, $this, $eventArguments);
    }
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]);
		}
	}
1180160
protected function setTable($type, $name)
    {
        Validate::table($name)->exists();
        $this->tables[$type] = $name;
    }
20503
function trigger(eventType, ...args) {

    let event = new Event(event);
    args.length ? event[eventType] = args : null;
    this.dispatchEvent(event);
}
181320
public function event($name, $payload = null) {
		$this->log->log("EVENT: $name",  Net_XMPP_XMPPHP_Log::LEVEL_DEBUG);
		foreach($this->eventhandlers as $handler) {
			if($name == $handler[0]) {
				if($handler[2] === null) {
					$handler[2] = $this;
				}
				$handler[2]->$handler[1]($payload);
			}
		}
		foreach($this->until as $key => $until) {
			if(is_array($until)) {
				if(in_array($name, $until)) {
					$this->until_payload[$key][] = array($name, $payload);
					if(!isset($this->until_count[$key])) {
						$this->until_count[$key] = 0;
					}
					$this->until_count[$key] += 1;
					#$this->until[$key] = false;
				}
			}
		}
	}
1004697
public function triggerModels($name, ModelEvent $event = null)
    {
        if ($event === null) {
            $event = new ModelEvent();
        }
        foreach ($this->models as $model) {
            $model->trigger($name, $event);
        }

        return $event->isValid;
    }
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);
            }
        }
    }
885026
public function triggerEvent($name, array $data = [])
    {
        try {
            /** @var EventInterface $event */
            $event = $this->createEventObject($name, $data);
        } catch (\InvalidArgumentException $exception) {
            return $this;
        }

        foreach ($this->options['events'][$name]['listeners'] as $eventListener) {
            if ($event->isPropagationStopped()) {
                $this->loggerInstance->makeLogEvent($name, $eventListener, self::EVENT_STATUS_BREAK);
                break;
            }

            $this->executeListener($eventListener, $event, $name);
        }

        return $this;
    }
945856
public function trigger($eventName, $origin = null, $context = [], EventInterface $event = null)
    {
        if ($eventsHandler = $this->getEventsHandler()) {
            $eventsHandler->trigger($eventName, $origin, $context, $event);
        }
    }
1113459
public function override(string $name, Type $type) : void
    {
        if (! isset($this->instances[$name])) {
            throw DBALException::typeNotFound($name);
        }

        if (! in_array($this->findTypeName($type), [$name, null], true)) {
            throw DBALException::typeAlreadyRegistered($type);
        }

        $this->instances[$name] = $type;
    }
635692
public function emit($type, $name, $arguments = [])
    {
        $fullName = $type . '.' . $name;
        if (!empty($this->events) && isset($this->events[$fullName])) {
            foreach ($this->events[$fullName] as $e) {
                call_user_func_array($e, $arguments);
            }
        }
    }
421484
protected function eventsCallback(string $name, string $event): void
    {
        $this->server->on($name, function () use ($name, $event) {
            try {
                $this->eventObjects[$name] = new $event(...$this->filterServer(func_get_args()));
                $this->eventObjects[$name]->handle($this);
            } catch (\Exception $e) {
                $this->app->make(ExceptionHandler::class)->report($e);
            } catch (\Throwable $e) {
                $this->app->make(ExceptionHandler::class)->report(new FatalThrowableError($e));
            }
        });
    }
1368060
protected function call($object, $name, array $arguments = [])
    {
        $start = microtime(true);

        $ret = call_user_func_array(array($object, $name), $arguments);

        $this->notifyEvent($name, $arguments, $ret, microtime(true) - $start);

        return $ret;
    }
875359
public function loadEvent($name)
    {
        // 1. Load event data only once
        if (isset($this->loadedEvents[$name])) {
            return;
        }
        $this->loadedEvents[$name] = true;

        // 2. Get event handlers
        $events = $this->getEvents();
        if (!isset($events[$name])) {
            return;
        }

        // 3. Attach handlers to event
        $baseMethod = 'on' . ucfirst($name);
        foreach ($events[$name] as $priority => $pluginIds) {
            if ($priority && $priority != static::DEFAULT_PRIORITY) {
                $method = $baseMethod . $priority;
            } else {
                $method = $baseMethod;
            }

            foreach ($pluginIds as $pluginId) {
                $plugin = $this->getById($pluginId);
                if (method_exists($plugin, $method)) {
                    $this->event->on($name, [$plugin, $method], $priority);
                }
            }
        }
    }