registers the hook with this Laser VM
977418
def register_laser_hooks(self, hook_type: str, hook: Callable):
        """"""
        if hook_type == "add_world_state":
            self._add_world_state_hooks.append(hook)
        elif hook_type == "execute_state":
            self._execute_state_hooks.append(hook)
        elif hook_type == "start_sym_exec":
            self._start_sym_exec_hooks.append(hook)
        elif hook_type == "stop_sym_exec":
            self._stop_sym_exec_hooks.append(hook)
        elif hook_type == "start_sym_trans":
            self._start_sym_trans_hooks.append(hook)
        elif hook_type == "stop_sym_trans":
            self._stop_sym_trans_hooks.append(hook)
        else:
            raise ValueError(
                "Invalid hook type %s. Must be one of {add_world_state}", hook_type
            )
136718
public void register() {
        log.info("Application scope: {}", scope);
        // set the logger to the app scope
        //log = Red5LoggerFactory.getLogger(WebSocketScope.class, scope.getName());
        WebSocketScopeManager manager = ((WebSocketPlugin) PluginRegistry.getPlugin("WebSocketPlugin")).getManager(scope);
        manager.setApplication(scope);
        log.info("WebSocket app added: {}", scope.getName());
        manager.addWebSocketScope(this);
        log.info("WebSocket scope added");
    }
625926
def hook(self, hook_name):
        
        def wrapper(fn):
            self.register_hook(hook_name, fn)
            return fn
        return wrapper
804738
def register_postcmd_hook(self, func: Callable[[plugin.PostcommandData], plugin.PostcommandData]) -> None:
        """"""
        self._validate_prepostcmd_hook(func, plugin.PostcommandData)
        self._postcmd_hooks.append(func)
838071
def register(self, callback, name):
        ''
        server.CALLBACKS[name] = callback
        self.run('''
            window.skink.%s = function(args=[]) {
                window.skink.call("%s", args);
            }''' % (name, name))
935081
def extern(obj, timeout=200):
    
    global installed

    # Register it just once.
    if not installed: 
        install_hook(obj, timeout)
    installed = True
286005
protected function registerManagerStopCallback()
    {
        $this->swooleServer->on('ManagerStop', function () {
            $this->events->dispatch(new Events\ManagerStopped($this));

            $this->dispatchEvent('ManagerStop', $this);
        });
    }
396591
def register():
    """"""
    if not plim:
        logger.warning('`slim` failed to load dependency `plim`. '
                       '`slim` plugin not loaded.')
        return
    if not mako:
        logger.warning('`slim` failed to load dependency `mako`. '
                       '`slim` plugin not loaded.')
        return
    if not bs:
        logger.warning('`slim` failed to load dependency `BeautifulSoup4`. '
                       '`slim` plugin not loaded.')
        return
    if not minify:
        logger.warning('`slim` failed to load dependency `htmlmin`. '
                       '`slim` plugin not loaded.')
        return

    signals.get_writer.connect(get_writer)
1153443
def load(self, laser_plugin: LaserPlugin) -> None:
        
        log.info("Loading plugin: {}".format(str(laser_plugin)))
        laser_plugin.initialize(self.symbolic_vm)
        self.laser_plugins.append(laser_plugin)
1372444
function register(handle) {
  if (Array.isArray(handle)) {
    handle.forEach(item => {
      utils.register(item);
    });
  } else {
    utils.register(handle);
  }
}
305389
public function registerHookProviders()
    {
        // load only the enabled hooks
        $hooks = $this->app['hooks']->hooks()->where('enabled', true);
        $loader = AliasLoader::getInstance();

        foreach ($hooks as $hook) {
            // load providers
            foreach ($hook->getProviders() as $provider) {
                $this->app->register($provider);
            }

            // set aliases
            foreach ($hook->getAliases() as $alias => $class) {
                $loader->alias($alias, $class);
            }
        }
    }
136454
def register(self, plugin, name=None):
        
        plugin_name = name or self.get_canonical_name(plugin)

        if plugin_name in self._name2plugin or plugin in self._plugin2hookcallers:
            if self._name2plugin.get(plugin_name, -1) is None:
                return  # blocked plugin, return None to indicate no registration
            raise ValueError(
                "Plugin already registered: %s=%s\n%s"
                % (plugin_name, plugin, self._name2plugin)
            )

        # XXX if an error happens we should make sure no state has been
        # changed at point of return
        self._name2plugin[plugin_name] = plugin

        # register matching hook implementations of the plugin
        self._plugin2hookcallers[plugin] = hookcallers = []
        for name in dir(plugin):
            hookimpl_opts = self.parse_hookimpl_opts(plugin, name)
            if hookimpl_opts is not None:
                normalize_hookimpl_opts(hookimpl_opts)
                method = getattr(plugin, name)
                hookimpl = HookImpl(plugin, plugin_name, method, hookimpl_opts)
                hook = getattr(self.hook, name, None)
                if hook is None:
                    hook = _HookCaller(name, self._hookexec)
                    setattr(self.hook, name, hook)
                elif hook.has_spec():
                    self._verify_hook(hook, hookimpl)
                    hook._maybe_apply_history(hookimpl)
                hook._add_hookimpl(hookimpl)
                hookcallers.append(hook)
        return plugin_name
283499
private function registerRobotsService()
    {
        $this->app->singleton('arcanedev.robots', Robots::class);

        $this->app->bind(
            \Arcanedev\Robots\Contracts\Robots::class,
            'arcanedev.robots'
        );
    }
1225762
protected function registerApiAdapter()
    {
        $this->app->singleton('mollie.api', function (Container $app) {
            $config = $app['config'];

            return new MollieApiWrapper($config, $app['mollie.api.client']);
        });

        $this->app->alias('mollie.api', MollieApiWrapper::class);
    }
126220
def register_plugin(self):
        """"""
        self.main.restore_scrollbar_position.connect(
            self.restore_scrollbar_position)
        self.main.console.edit_goto.connect(self.load)
        self.exec_in_extconsole.connect(self.main.execute_in_external_console)
        self.redirect_stdio.connect(self.main.redirect_internalshell_stdio)
        self.open_dir.connect(self.main.workingdirectory.chdir)
        self.set_help(self.main.help)
        if self.main.outlineexplorer is not None:
            self.set_outlineexplorer(self.main.outlineexplorer)
        editorstack = self.get_current_editorstack()
        if not editorstack.data:
            self.__load_temp_file()
        self.main.add_dockwidget(self)
        self.main.add_to_fileswitcher(self, editorstack.tabs, editorstack.data,
                                      ima.icon('TextFileIcon'))
1144339
function registerListeners() {
  const exit = function exit(signal) {
    console.log(chalk.bgBlack.yellow(`Received ${signal} => Exiting`))
    process.exit()
  }
  const SIGABRT = 'SIGABRT'
  const SIGHUP = 'SIGHUP'
  const SIGINT = 'SIGINT'
  const SIGQUIT = 'SIGQUIT'
  const SIGTERM = 'SIGTERM'

  process.on(SIGABRT, () => exit(SIGABRT))
  process.on(SIGHUP, () => exit(SIGHUP))
  process.on(SIGINT, () => exit(SIGINT))
  process.on(SIGQUIT, () => exit(SIGQUIT))
  process.on(SIGTERM, () => exit(SIGTERM))
}
481202
def register_postparsing_hook(self, func: Callable[[plugin.PostparsingData], plugin.PostparsingData]) -> None:
        """"""
        self._validate_postparsing_callable(func)
        self._postparsing_hooks.append(func)