Register the repository service.
12417
private function registerRepository()
    {
        $this->app->singleton('migration.repository', function ($app) {
            $table = $app['config']['database.migrations'];

            return new DatabaseMigrationRepository($app['db'], $table);
        });
    }
291625
protected function registerDatabaseService(): void
    {
        $this->app->alias('db', \Illuminate\Database\ConnectionResolverInterface::class);
        $this->app->register(\Illuminate\Database\DatabaseServiceProvider::class);

        if (File::exists($this->app->databasePath('seeds'))) {
            collect(File::files($this->app->databasePath('seeds')))->each(
                function ($file) {
                    File::requireOnce($file);
                }
            );
        }
    }
165843
public function register()
    {
        $this->bindGuzzle();

        $this->bindAuth();

        $this->bindHttpClient();

        $this->bindApiClient();

        $this->bindTaxonomyMapper();
    }
156642
public void register() {
        if (registration != null) {
            throw new IllegalStateException("Webapplication is already registered.");
        }
        validateNotNull(applicationName, "applicationName");
        validateNotNull(mountPoint, "mountPoint");
        Hashtable<String, Object> props = new Hashtable<String, Object>();
        props.put(Constants.APPLICATION_NAME, applicationName);
        props.put(Constants.MOUNTPOINT, mountPoint);
        props.put(Constants.CONTEXT_PARAMS, contextParam);
        registration = bundleContext.registerService(WebApplicationFactory.class, this, props);
    }
593732
public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/../config/modules.php', 'modules'
        );

        $this->app->register(ConsoleServiceProvider::class);
        $this->app->register(GeneratorServiceProvider::class);
        $this->app->register(BladeServiceProvider::class);

        $this->app->singleton('modules', function ($app) {
            return new RepositoryManager($app);
        });
    }
470140
public function register() {
        $this->registerFilesystemProvider();
        $this->registerDatabaseProvider();
        $this->registerCompressorProvider();
        $this->registerShellProcessor();
        $this->registerArtisanCommands();
    }
464547
public function register()
    {
        $this->app->bind(
            'Modules\Dashboard\Repositories\WidgetRepository',
            function () {
                $repository = new EloquentWidgetRepository(new Widget());

                if (! config('app.cache')) {
                    return $repository;
                }

                return new CacheWidgetDecorator($repository);
            }
        );
    }
1080340
def register(self, alias, uri):
        
        # TODO: do we want to constrain the valid alias names.
        if isinstance(uri, dict):
            id = uri.get('id', alias)
            self.resolver.store[id] = uri
            uri = id
        self.aliases[alias] = uri
705399
public function register()
    {
        $app = $this->app;

        // register spec path for app
        $app['path.specs'] = $app->basePath().'/resources/specs';

        // register spec repository
        $app->singleton('specs', function ($app) {
            $loader = new Repository\FileLoader($app['files'], $app['path.specs']);

            return new Repository\NamespacedRepository($loader);
        });

        // register addon environment
        $app->instance('addon', $this->addonEnvironment = new AddonEnvironment($app));
        $app->alias('addon', AddonEnvironment::class);

        // register addon generator
        $app->singleton('addon.generator', function ($app) {
            return new AddonGenerator();
        });
        $app->alias('addon.generator', AddonGenerator::class);

        // register database migrator
        $app->singleton('database.migrator', function ($app) {
            return new Migrator($app['db'], $app['config']);
        });
        $app->alias('database.migrator', Migrator::class);

        $app['events']->fire(new AddonWorldCreated($this->addonEnvironment));

        $this->registerClassResolvers();

        (new AddonRegistrar)->register($app, $this->addonEnvironment->addons());

        $app['events']->fire(new AddonRegistered($this->addonEnvironment));
    }
23911
protected function registerGitHubFactory()
    {
        $this->app->singleton('github.factory', function (Container $app) {
            $auth = $app['github.authfactory'];
            $cache = $app['cache'];

            return new GitHubFactory($auth, $cache);
        });

        $this->app->alias('github.factory', GitHubFactory::class);
    }
1009681
protected function registerAuthRepository()
    {
        $this->app->singleton(AuthRepositoryInterface::class, function (Application $app) {
            return $app->make(AuthRepository::class);
        });

        return $this;
    }
621618
public function register()
    {
        $this->registerRevisionRepository();
        $this->registerUserRepository();
        $this->registerGroupRepository();
        $this->registerCredentials();

        $this->registerLoginController();
        $this->registerRegistrationController();
        $this->registerResetController();
        $this->registerActivationController();
    }
820078
@Override
    public void registerService(Class<?> clazz, Object service) {
        this.services.put(clazz, service);
    }
1264705
protected function registerRepository()
    {
        $this->app->singleton(RepositoryContract::class, function (Container $container) {
            $config = $container->make(ConfigRepository::class);
            $guard  = $container->make(Guard::class);
            $cache  = $container->make(CacheFactory::class)->store($config->get('vi-kon.db-config.cache'));

            return new Repository($guard, $cache);
        });

        $this->app->alias(RepositoryContract::class, 'config.db');
    }
945333
protected function registerMetadataService()
    {
        if ($this->getServiceLocator()->has(MetadataService::SERVICE_ID)) {
            $metadataService = $this->getServiceLocator()->get(MetadataService::SERVICE_ID);
        } else {
            $metadataService = $this->getServiceManager()->build(MetadataService::class);
        }
        $metadataService->setOption(MetadataService::IMPORTER_KEY, $this);
        $this->getServiceManager()->register(MetadataService::SERVICE_ID, $metadataService);
    }
858100
public function register()
    {
        $this->setupConfig();

        $services = config('microservice.services');
        $currentEnv = app()->environment();

        /** @var array $services */
        foreach ($services as $service) {
            if ($service['enabled'] && $this->isInCurrentEnv($currentEnv, $service['environments'])) {
                if (array_get($service, 'config')) {
                    $this->app->configure($service['config']);
                }

                $this->app->register($service['provider']);
            }
        }

        app()->middleware(ConvertEmptyStringsToNull::class);
    }
255976
private void verifyRepoRegistered(String repoFullName) {
    lock.readLock().lock();
    try {
      if (!entityListenersByRepo.containsKey(requireNonNull(repoFullName))) {
        LOG.error(
            "Repository [{}] is not registered in the entity listeners service", repoFullName);
        throw new MolgenisDataException(
            "Repository ["
                + repoFullName
                + "] is not registered, please contact your administrator");
      }
    } finally {
      lock.readLock().unlock();
    }
  }