Fire an event
@param {string} event_name The name of event
@param {*} [event_args] Dynamic event arguments. Anything, that may be needed by listener
345918
function(event_name, event_args) {

		if (Lava.schema.DEBUG && typeof(event_name) == "undefined") Lava.t();

		if (this._listeners[event_name] != null) {

			this._callListeners(this._listeners[event_name], event_args);

		}

	}
1367652
public function fireEvents(string $name, QueryObject $queryObject, array $eventArguments = []): void
    {
        $this->connection->getEventHandler()->fireEvents($name, $queryObject, $this, $eventArguments);
    }
755776
def fire_event(self, event_name, service_name, default=None):
        
        service = self.get_service(service_name)
        callbacks = service.get(event_name, default)
        if not callbacks:
            return
        if not isinstance(callbacks, Iterable):
            callbacks = [callbacks]
        for callback in callbacks:
            if isinstance(callback, ManagerCallback):
                callback(self, service_name, event_name)
            else:
                callback(service_name)
1152439
def on_event(event_handler = nil, &block)
      event_handler ||= block
      raise ArgumentError, "no event_handler provided" if event_handler.nil?
      @event_handler = event_handler
    end
661570
def fire_event(self, event, *args, **kwargs):
        
        remove = []
        event_stack = self._events[event]
        for x in event_stack:
            x['callback'](*args, **kwargs)
            if x['single']:
                remove.append(x)
        for x in remove:
            event_stack.remove(x)
84792
def bind event, *xargs, &blk
        #$log.debug "#{self} called EventHandler BIND #{event}, args:#{xargs} "
        if @_events
          $log.warn "bind: #{self.class} does not support this event: #{event}. #{@_events} " if !event? event
          #raise ArgumentError, "#{self.class} does not support this event: #{event}. #{@_events} " if !event? event
        else
          # it can come here if bind in initial block, since widgets add to @_event after calling super
          # maybe we can change that.
          $log.warn "BIND #{self.class} (#{event})  XXXXX no events defined in @_events. Please do so to avoid bugs and debugging. This will become a fatal error soon."
        end
        @handler ||= {}
        @event_args ||= {}
        @handler[event] ||= []
        @handler[event] << blk
        @event_args[event] ||= []
        @event_args[event] << xargs
      end
738510
public function on($event_name, $handler_callback)
    {
        $event = null;
        if (!isset($this->event_queue[$event_name])) {
            $event = new Event($event_name);
            $this->event_queue[$event_name] = $event;
        }

        $event = $this->event_queue[$event_name];
        $event->setHandlerCallback($handler_callback);
    }
603508
function(eventName, options) {
    if (!this.__eventListeners) {
      this.__eventListeners = { }
    }
    var listenersForEvent = this.__eventListeners[eventName];
    if (!listenersForEvent) return;
    for (var i = 0, len = listenersForEvent.length; i < len; i++) {
      // avoiding try/catch for perf. reasons
      listenersForEvent[i](options || { });
    }
  }
1136594
function(event_name) {

		if (event_name == 'mouse_events') {

			this._events_listeners['mouseover'] =
				Lava.Core.addGlobalHandler('mouseover', this.handleMouseMovement, this);
			this._events_listeners['mouseout'] =
				Lava.Core.addGlobalHandler('mouseout', this.handleMouseMovement, this);

		} else {

			this._events_listeners[event_name] =
				Lava.Core.addGlobalHandler(event_name, this.onDOMEvent, this);

		}

	}
771150
def define_event(name, args = {})
      args = {:create_method => true}.merge(args)
      name = name.to_sym
      
      if args[:create_method]
        define_method name do
          return event(name)
        end
      end
      
      @unobservable_instance_events ||= Set.new
      if @unobservable_instance_events.include? name
        return false
      else
        @unobservable_instance_events.add name
        return true
      end
    end
479146
def _trigger(self, event_name, *args, **kwargs):
        
        self.log('event: %s' % event_name, *args)
        for f in self._events[event_name]:
            f(*args, **kwargs)
626981
function emit(eventName, id, args) {
  var js = "function () { window.socket.emit(\"" + eventName + "\"";

  // we're assuming args is an array of function arguments
  // if not, wrap it
  if (!(args instanceof Array)) {
    args = [args];
  }

  if (id) {
    js += ", " + id + ", " + JSON.stringify(args);
  }

  js += ");}";

  controlPage.evaluate(js);
}
1309440
function emit(name, args, thisArg, delay) {
        var list = eventHandlers[name];
        if ( list ) {
            thisArg || (thisArg = this);
            if ( args ) {
                args = args.slice(); // make a copy
                args.unshift(name);
            }
            else {
                args = [name];
            }
            _.each(list, function (hdl, idx) {
                // var _args = args.slice();
                delay > -1
                    ? setTimeout(function () {
                        hdl.apply(thisArg, args);
                      }, delay)
                    : hdl.apply(thisArg, args)
                ;
            });
        }
        return this;
    }
1174709
def attr_event(*names)
      args = (names[-1].is_a? Hash) ? names.pop : {}
      names.each {|n| define_event(n, args) }
      return nil
    end
944959
def trigger(name, *args)
      event_table[name].each { |handler| handler.send( name.to_sym , *args) }
    end
738331
def method_missing(method_name, *args, &_block)
      args = args.first if args.size == 1
      @events[method_name] = args
    end
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);
                    }
                }
            }
        }
    }