Register the Homer manager.
495658
protected function registerHomer()
    {
        $this->app->singleton('homer', function ($app) {
            return new HomerManager($app, $app['homer.context'], $app['homer.dispatcher'], $app['config']['homer']);
        });
    }
139873
public function register()
	{
		$this->app->booting(function()
		{
			$loader = \Illuminate\Foundation\AliasLoader::getInstance();
			$loader->alias('Arr', 'MrAudioGuy\Commons\Facades\Arr');
			$loader->alias('Error', 'MrAudioGuy\Commons\Facades\Error');
		});
		$this->app['arr'] = $this->app->share(function($app)
		{
			return new Arr();
		});

		$this->app['error'] = $this->app->share(function($app)
		{
			return new Error();
		});
	}
825264
def register(context, request, load):
    """"""
    data = request.json
    res = validate(data, dataclass_to_jsl(
        RegistrationSchema).get_schema())
    if res:
        @request.after
        def set_error(response):
            response.status = 422
        return {
            'status': 'error',
            'field_errors': [{'message': res[x]} for x in res.keys()]
        }

    if data['password'] != data['password_validate']:
        @request.after
        def adjust_response(response):
            response.status = 422

        return {'status': 'error',
                'message': 'Password confirmation does not match'}

    if 'state' not in data.keys() or not data['state']:
        data['state'] = request.app.settings.application.new_user_state
    del data['password_validate']
    obj = context.create(data)
    return {'status': 'success'}
1342883
def register(self):
        """"""
        loop = asyncio.new_event_loop()
        asyncio.set_event_loop(loop)
        loop.run_until_complete(self._register())
636791
def register(self, resource, event, trigger, **kwargs):
        """"""
        super(AristaTrunkDriver, self).register(resource, event,
                                                trigger, kwargs)
        registry.subscribe(self.subport_create,
                           resources.SUBPORTS, events.AFTER_CREATE)
        registry.subscribe(self.subport_delete,
                           resources.SUBPORTS, events.AFTER_DELETE)
        registry.subscribe(self.trunk_create,
                           resources.TRUNK, events.AFTER_CREATE)
        registry.subscribe(self.trunk_update,
                           resources.TRUNK, events.AFTER_UPDATE)
        registry.subscribe(self.trunk_delete,
                           resources.TRUNK, events.AFTER_DELETE)
        self.core_plugin = directory.get_plugin()
        LOG.debug("Arista trunk driver initialized.")
454590
protected function registerFiscalYearManagementInterface()
	{
		$this->app->bind('Mgallegos\DecimaAccounting\Accounting\Services\FiscalYearManagement\FiscalYearManagementInterface', function($app)
		{
			return new FiscalYearManager(
				$app->make('App\Kwaai\Security\Services\AuthenticationManagement\AuthenticationManagementInterface'),
				$app->make('App\Kwaai\Security\Services\JournalManagement\JournalManagementInterface'),
				$app->make('Mgallegos\DecimaAccounting\Accounting\Services\JournalManagement\JournalManagementInterface'),
				$app->make('App\Kwaai\Security\Repositories\Journal\JournalInterface'),
				new	\Mgallegos\LaravelJqgrid\Encoders\JqGridJsonEncoder($app->make('excel')),
				new	\Mgallegos\DecimaAccounting\Accounting\Repositories\FiscalYear\EloquentFiscalYearGridRepository(
					$app['db'],
					$app->make('App\Kwaai\Security\Services\AuthenticationManagement\AuthenticationManagementInterface'),
					$app['translator']
				),
				$app->make('Mgallegos\DecimaAccounting\Accounting\Repositories\FiscalYear\FiscalYearInterface'),
				$app->make('Mgallegos\DecimaAccounting\Accounting\Repositories\JournalEntry\JournalEntryInterface'),
				new Carbon(),
				$app['db'],
				$app['translator'],
				$app['config']
			);
		});
	}
488947
public function register()
	{
		$this->app['log'] = function($app)
		{
			$path = $app['config']->get('log_path');
			if (is_dir('/var/log/hubzero'))
			{
				$path = '/var/log/hubzero';
			}

			$dispatcher = null;
			if ($app->has('dispatcher'))
			{
				$dispatcher = $app['dispatcher'];
			}

			$manager = new Manager($path);

			$manager->register('debug', array(
				'file'       => 'cmsdebug.log',
				'dispatcher' => $dispatcher
			));

			$manager->register('auth', array(
				'file'       => 'cmsauth.log',
				'level'      => 'info',
				'format'     => "%datetime% %message%\n",
				'dispatcher' => $dispatcher
			));

			$manager->register('spam', array(
				'file'       => 'cmsspam.log',
				'dispatcher' => $dispatcher
			));

			return $manager;
		};
	}
691879
def register_plugin(self, name):
        """"""
        logger.info("Registering plugin: " + name)
        module = importlib.import_module(name)
        module.register_plugin(self)
515339
public function registerManager()
    {
        $this->app->singleton('nodes.assets', function ($app) {
            $uploadProvider = call_user_func(config('nodes.assets.general.upload.provider'), $app);
            $urlProvider = call_user_func(config('nodes.assets.general.url.provider'), $app);

            return new Manager($uploadProvider, $urlProvider);
        });
    }
956716
def create_manager(arguments):
  """"""

  if arguments.statefile is None:
    arguments.statefile = os.path.join(os.path.dirname(arguments.logdir), 'submitted.db')

  arguments.statefile = os.path.realpath(arguments.statefile)

  return manager.JobManager(statefile=arguments.statefile)
1271358
def register_plugin(self):
        """"""
        main = self.main
        main.add_dockwidget(self)

        #if getattr(main.projectexplorer, 'sig_project_closed', False):
        #    pe = main.projectexplorer
        #    pe.condamanager = self
        #    pe.sig_project_closed.connect(self.project_closed)
        #    pe.sig_project_loaded.connect(self.project_loaded)
        #    self.sig_worker_ready.connect(self._after_load)
        #    self.sig_environment_created.connect(pe.sig_environment_created)

        self.sig_channels_updated.connect(self._save_channel_settings)
613772
def register(
            self,
            app: 'Quart',
            first_registration: bool,
            *,
            url_prefix: Optional[str]=None,
    ) -> None:
        """"""
        state = self.make_setup_state(app, first_registration, url_prefix=url_prefix)

        if self.has_static_folder:
            state.add_url_rule(
                self.static_url_path + '/<path:filename>',
                view_func=self.send_static_file, endpoint='static',
            )

        for func in self.deferred_functions:
            func(state)
1304006
public function register()
    {
        foreach (array_keys($this->generators) as $command) {
            $class = "Orchestra\\Studio\\Console\\{$command}Command";
            $name  = $this->generators[$command];

            $this->app->singleton($name, $class);
        }

        $this->commands(array_values($this->generators));
    }
914825
def register_plugin(self):
        """"""
        self.main.restore_scrollbar_position.connect(
                                               self.restore_scrollbar_position)
        self.main.add_dockwidget(self)
292512
protected function registerManager()
    {
        $this->app->singleton(Manager::class, function ($app) {
            return new Manager($app, 'lumen');
        });

        $this->app->alias(Manager::class, 'swoole.manager');
    }
291845
private void registerThis()
    {
        DefaultComponentDescriptor<ComponentManager> cd = new DefaultComponentDescriptor<>();
        cd.setRoleType(ComponentManager.class);

        registerComponent(cd, this);
    }
1094349
def register():
    """"""
    from pelican import signals

    signals.initialized.connect(setup_git)

    signals.article_generator_finalized.connect(replace_git_url)