Register handlers. Activates this handler.
764045
public void register() {
		registrations.add(editService.addGeometryEditMoveHandler(this));
		registrations.add(editService.addGeometryEditShapeChangedHandler(this));
		registrations.add(editService.addGeometryEditTentativeMoveHandler(this));
		registrations.add(editService.addGeometryEditChangeStateHandler(this));
	}
1158362
public function register()
    {
        $displayer = new BasicDisplayer;
        $handler = new Handler($displayer);
        $this->container->bind('error', $handler);
    }
1333500
private void registerListeners() {
    protocol.registerAppendHandler(this::append);
    protocol.registerBackupHandler(this::backup);
    protocol.registerConsumeHandler(this::consume);
    protocol.registerResetConsumer(this::reset, threadContext);
  }
31885
def register(self, *handlers, **params):
        
        for handler in handlers:

            if issubclass(handler, PWModel):
                handler = type(
                    handler._meta.db_table.title() + 'Admin',
                    (PWAdminHandler,), dict(model=handler, **params))
                self.app.register(handler)
                continue

            name = handler.name.lower()
            self.handlers[name] = handler
900307
def _registerHandler(self, handler):
        
        self._logger.addHandler(handler)
        self._handlers.append(handler)
1326504
protected function registering()
    {
        $this->app->bindShared(ServiceShortCuts::RESOLVER_SERVICE, function () {
            return new Resolver($this->app);
        });

        $this->app->bindShared(ServiceShortCuts::GHOST_SERVICE, function () {
            return new GhostServices($this->app);
        });

        $this->app->bind(ServiceShortCuts::CORE_INITIALIZED, true);

        $this->app->booting(function () {
            $loader = AliasLoader::getInstance();

            foreach ($this->aliases as $facade => $facadeClass) {
                $loader->alias($facade, $facadeClass);
            }
        });
    }
168454
public function register() {
		if (!$this->is_registered) {
			// Automatically use Sentry if detected
			if ($this->detected_sentry() and Config::$sentry_dsn !== null) {
				$this->add_handler(new Handler\Sentry());
			}

			// If we configured mail, send mail too
			if (Config::$mail_errors_to !== null) {
				$this->add_handler(new Handler\Mail());
			}

			// Always add the application handler
			$this->add_handler(new Handler\Application());

			if (Config::$debug === true) {
				// If we detect Whoops, use that instead of our basic handler
				if ($this->detected_whoops()) {
					$this->add_handler(new Handler\Whoops());
				} else {
					$this->add_handler(new Handler\BasicCLI());
					$this->add_handler(new Handler\Basic());
				}
			} else {
				// If we are not in debug, and we end up as the last handler,
				// send some crude error message to the user's browser.
				$this->add_handler(new Handler\BasicOutput());
			}

			set_error_handler([$this, 'handle_error']);
			set_exception_handler([$this, 'handle_exception']);
			register_shutdown_function([$this, 'handle_shutdown']);

			$this->is_registered = true;
		}
	}
570161
protected function registerHandlers() {
		set_exception_handler(function($exception) {
			$this->pushException($exception);
			
			echo $this->renderDebugBar();
		});
		
		register_shutdown_function(function() {
			if ($this->onShutdownCallback !== null) {
				$this->onShutdownCallback->__invoke($this);
			}
			
			// Debug bar rendering for the deferred mode
			if ($this->deferredMode) {
				// Garbage collection
				if ($this->profilesGcEnabled) {
					$this->gcCycle();
				}
				
				// Content creating
				$filePath = $this->deferredDir . DIRECTORY_SEPARATOR . 'profile_' . $this->token . '.html';
				if (file_put_contents($filePath, $this->renderDebugBar()) === false) {
					throw new InvalidPath('Unable to write the debug data into: "' . $filePath . '"');
				}
			}
		});
	}
275531
function registerHandlers(handlers, commandStack) {
  forEach(handlers, function(handler, id) {
    commandStack.registerHandler(id, handler);
  });
}
496593
def enable_rights(self):
        
        if self.rights is None:
            handler_instance = RightsHandler(self)
            self.handlers.insert(len(self.default_handlers), handler_instance)
1269975
def trigger(self, *args, **kwargs):
        """"""
        for h in self.handlers:
            h(*args, **kwargs)
728162
public function register()
    {
        if ($this->hasHelpers()) {
            foreach ($this->helpers as $helper => $config) {
                $this->controller->view->loadHelper($helper, $config);
            }

            $this->logAvailableHelpers();
        }
    }
738524
def register(self, *paths, methods=None, name=None, handler=None):
        
        if isinstance(methods, str):
            methods = [methods]

        def wrapper(view):
            if handler is None:

                handler_ = view
                methods_ = methods or [METH_ANY]

                if isfunction(handler_) or ismethod(handler_):
                    handler_ = Handler.from_view(view, *methods_, name=name)

                handler_.bind(self, *paths, methods=methods_, name=name)

            else:

                view_name = view.__name__
                if not hasattr(handler, view_name):
                    setattr(handler, view_name, to_coroutine(view))
                name_ = name or view_name
                handler.bind(self, *paths, methods=methods, name=name_, view=view_name)

            return view

        # Support for @app.register(func)
        if len(paths) == 1 and callable(paths[0]):
            view = paths[0]

            if isclass(view) and issubclass(view, BaseException):
                return wrapper

            paths = []
            return wrapper(view)

        return wrapper
1365864
def register(self, library: str, cbl: Callable[['_AsyncLib'], None]):
        '''
        
        '''
        self._handlers[library] = cbl
211298
def register(*args, &block)
      h = Unobservable.handler_for(*args, &block)
      @handlers << h
      return h
    end
832852
private void addActivationHandler() {

        if (m_activationHandlerRegistration == null) {
            m_activationHandlerRegistration = addMouseDownHandler(new MouseDownHandler() {

                public void onMouseDown(MouseDownEvent event) {

                    // only act on click if not inside the button bar
                    if (!m_buttonBar.getElement().isOrHasChild((Node)event.getNativeEvent().getEventTarget().cast())) {
                        activateWidget();
                    }
                }
            });
        }
    }
642112
def register(self, func):
        
        assert callable(func)
        assert inspect.getargspec(func).args == ["user", "privilege"]
        self.handlers.add(func)