Register event handlers.
969330
protected function registerHandlers()
    {
        $this->on(self::EVENT_AUTHORIZED, Authorized::class);
        $this->on(self::EVENT_UNAUTHORIZED, Unauthorized::class);
        $this->on(self::EVENT_UPDATE_AUTHORIZED, UpdateAuthorized::class);
        $this->on(self::EVENT_COMPONENT_VERIFY_TICKET, VerifyTicketRefreshed::class);
    }
981695
function registerEventHandlers(windowBridge, app)
{
  "use strict";
  handleOutgoingEvent(windowBridge, app, WebAPIEvents.EVENT_WEBAPI_REQUEST_DESKPRO, WebAPIEvents.props.EVENT_WEBAPI_REQUEST_DESKPRO);
  handleOutgoingEvent(windowBridge, app, WebAPIEvents.EVENT_WEBAPI_REQUEST_FETCH, WebAPIEvents.props.EVENT_WEBAPI_REQUEST_FETCH);
}
743576
public function registerEvents()
    {
        // Delete user tokens after login
        if (config('passwordless.empty_tokens_after_login') === true) {
            Event::listen(
                Authenticated::class,
                function (Authenticated $event) {
                    $event->user->tokens()
                        ->delete();
                }
            );
        }
    }
718789
private void executeHandlers(List<Event> filteredEvents) {
        for (EventHandler current : eventHandlers) {
            for (Event event : filteredEvents) {
                current.handleEvent(event);
            }
        }
    }
422446
def register_event(self, *names):
        
        for name in names:
            if name in self.__events:
                continue
            self.__events[name] = Event(name)
820302
def _attach_handler_events(self, handler, events=None):
        
        if not events:
            events = self
        for name in events:
            meth = getattr(handler, name, None)
            if meth:
                self.events[name] += meth
1133992
public static function initialize()
    {
        if (static::$isConfigurationLoaded === true) {
            return;
        }
        
        foreach (static::$handlers as $handler) {
            EventManager::getInstance()->addEventHandler($handler[0], $handler[1], $handler[2], $handler[3]);
        }

        static::$isConfigurationLoaded = true;
    }
222941
def register_event(self, event):
        """"""

        self.log('Registering event hook:', event.cmd, event.thing,
                 pretty=True, lvl=verbose)
        self.hooks[event.cmd] = event.thing
472320
function triggerIfHandlers(that, handlerListName, event) {
    triggerIfHandlerList(that[handlerListName][event], event)
    triggerIfHandlerList(that[normalHandlerToAllHandlerProperty(handlerListName)], event)
}
327380
public function register()
    {
        parent::register();

        $this->app->booted(function (Application $app) {
            $this->registerEventListeners($app->make('events'));
        });
    }
328111
protected function registerEvents()
    {
        $events = $this->app->make(Dispatcher::class);

        foreach ($this->events as $event => $listeners) {
            foreach ($listeners as $listener) {
                $events->listen($event, $listener);
            }
        }
    }
64503
public function registerPortEvents(): void
    {
        foreach ((array)$this->options['events'] as $event => $method) {
            // ['onConnect'] --> 'Connect', 'onConnect
            if (\is_int($event)) {
                $event = substr($method, 2);
            }

            // e.g $server->on('Request', [$this, 'onRequest']);
            if (method_exists($this, $method)) {
                $this->port->on($event, [$this, $method]);
            }
        }
    }
1335308
private function registerListeners(): void
    {
        Event::listen(ReactionHasBeenAdded::class, IncrementAggregates::class);
        Event::listen(ReactionHasBeenRemoved::class, DecrementAggregates::class);
    }
1093995
protected function registerEvents()
    {
        $this->app->terminating(function () {
            $this->app->make('events')->fire('antares.done');
            $this->app->make('events')->fire(new AntaresDone());
        });
    }
1310309
protected function register(): void
	{
		// Allows us to handle "fatal" errors

		register_shutdown_function(function(): void
		{
			$e = error_get_last();

			if($e !== null && (error_reporting() & $e['type']) !== 0 && !$this->disableShutdownHandler)
			{
				$this->handler(new ErrorException($e['message'], $e['type'], 0, $e['file'], $e['line']));

				exit(1);
			}
		});

		// Set the exception handler

		set_exception_handler([$this, 'handler']);
	}
564255
protected function ensureEventListeners()
	{
		if ($this->_eventListeners === null) {
			$this->_eventListeners = [];
			if (method_exists($this, 'eventListeners')) {
				$this->setEventListeners($this->eventListeners());
			}
		}
	}
809791
private void registerEventHandler() {

        clearEventHandler();
        m_previewRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {

            @SuppressWarnings("synthetic-access")
            public void onPreviewNativeEvent(NativePreviewEvent event) {

                if (!(m_pointWidget.isAttached())) {
                    clearEventHandler();
                    return;
                }

                NativeEvent nativeEvent = event.getNativeEvent();
                if (nativeEvent == null) {
                    return;
                }
                int eventType = event.getTypeInt();
                switch (eventType) {
                    case Event.ONMOUSEUP:
                        clearEventHandler();
                        save();
                        break;
                    case Event.ONMOUSEMOVE:
                        handleMove(nativeEvent);
                        break;
                    default:
                        break;
                }
            }

        });
    }