Handle event

@access public
@param string $event
@param array $args
328945
public function handle($event, $args) {
		if (isset($this->callback[$event])) {
			$this->callback[$event](...$args);
		}
	}
301591
public function emit(string $event, ...$args)
    {
        if ($this->_events[$event] ?? false) {

            foreach ($this->_events[$event] as $handler) {

                $handler(...$args);
            }
        }

        return $this;
    }
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);
        }
    }
434527
public function dispatchEvent($event, ...$arguments)
    {
        $this->dispatchEventToEventCallbacks($event, $arguments);

        $this->dispatchEventToEventHandler($event, $arguments);
    }
1130936
function (eventName, args)
  {
    var e = this._events[eventName];
    if (e) {
      args = args || [];
      e.forEach (function (handler)
      {
        handler.apply (this, args);
      });
    }
  }
554347
function (event/*, args... */) {
		this._events = this._events || {};
		var e = this._events[event];
		if (e) {
			for (var i = 0, l = e.length; i < l; i++){
				e[i][0].apply(e[i][1] || this, slice(arguments, 1));
			}
		}
	}
223795
public static function fire($event, array $args = [])
    {
        if (!isset(self::$events[$event])) {
            return false;
        }

        // 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]) {
            return self::off($event);
        }

        return true;
    }
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);
            }
        }
    }
826734
public function runEvent($event)
    {
        $this->line('<info>Running scheduled command:</info> '.$event->getSummaryForDisplay());
        $event->run($this->laravel);
        $this->eventsRan = true;
    }
1305567
public function handle($event)
    {
        $needCrop = $event->dataType->rows()
            ->whereType('image')
            ->where('details', 'like', '%cropper%')
            ->exists();

        if ($needCrop) {
            $event->model->cropPhotos($event);
        }
    }
427078
function onQuickFormEvent($event, $arg, &$caller)
    {
        switch ($event) {
            case 'createElement':
                parent::onQuickFormEvent($event, $arg, $caller);
                if ($caller->isNoSubmitButton($arg[0])){
                    //need this to bypass client validation
                    //for buttons that submit but do not process the
                    //whole form.
                    $onClick = $this->getAttribute('onclick');
                    $skip = 'skipClientValidation = true;';
                    $onClick = ($onClick !== null)?$skip.' '.$onClick:$skip;
                    $this->updateAttributes(array('onclick'=>$onClick));
                }
                return true;
                break;
        }
        return parent::onQuickFormEvent($event, $arg, $caller);

    }
738998
public function subflow(string $event, ...$args)
    {
        if (isset(self::$flows[$event])) {
            $this->triggerFlow(self::$flows[$event], ...$args);
        }

        return $this;
    }
819599
public function execute(array $args = [], array $options = [])
    {
        if (!$this->evaluate($this->condition)) {
            return;
        }

        $this->command->execute($args, $options);
    }
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);
        }
    }
564525
protected function handle(Event $event): void
    {
        $method = 'apply'.ClassName::short($event);

        if (!method_exists($this, $method)) {
            return;
        }

        $this->$method($event);
    }
437001
public static function dispatch(string $event, array $args = [], bool $return = false)
    {
        // is there some registered $listeners ?
        if (isset(Event::$listeners[$event]) && count(Event::$listeners[$event]) > 0) {

            // Get all listeners for given event.
            $listeners = Event::$listeners[$event];

            // Sort by priority
            krsort($listeners);

            // Loop through $listeners array
            foreach ($listeners as $listener) {

                // Loop through $_listener array
                foreach ($listener as $_listener) {

                    // Return or Render specific $_listener results ?
                    if ($return) {
                        return call_user_func_array($_listener['function'], (isset($args) ? $args : $_listener['args']));
                    } else {
                        call_user_func_array($_listener['function'], (isset($args) ? $args : $_listener['args']));
                    }
                }
            }
        }
    }
392337
public function triggerEvent($event, $args = [])
    {
        $dispatcher = $this->getDispatcher();

        if (!$dispatcher instanceof DispatcherInterface) {
            return null;
        }

        $args['mapper'] = $this;

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

        $innerListener = [$this, $event->getName()];

        if (!$event->isStopped() && method_exists($this, $event->getName())) {
            call_user_func($innerListener, $event);
        }

        return $event;
    }