Register service providers
324761
protected function registerProviders()
    {
        // register rollbar service provider
        if (class_exists(HCRollbarServiceProvider::class))
            $this->app->register(HCRollbarServiceProvider::class);

        // register LogViewer service provider
        if (class_exists(LaravelLogViewerServiceProvider::class))
            $this->app->register(LaravelLogViewerServiceProvider::class);
    }
400240
protected function registerServices()
    {
        foreach (self::$diMap as $serviceKey => $serviceClass) {
            if (\is_int($serviceKey)) {
                $this->register(new $serviceClass);
            } else {
                $this[$serviceKey] = function ($c) use ($serviceClass) {
                    return new $serviceClass($c);
                };
            }
        }
    }
1097835
protected function registerServices()
    {
        foreach ($this->serviceBindings as $key => $value) {
            is_numeric($key)
                    ? $this->app->singleton($value)
                    : $this->app->singleton($key, $value);
        }
    }
815958
protected function registerDefaultProviders() {

		array_map( function( $provider ) {
			$this->provider( $provider );
		}, [
			AttrServiceProvider::class,
			LanguageServiceProvider::class,
			MetaServiceProvider::class,
			TemplatesServiceProvider::class,
			HierarchyServiceProvider::class,
			ViewServiceProvider::class
		] );
	}
201298
protected void registerSelf() {
        publishSelf();
        serviceRegistry.get().registerService(getServiceDescription());
        serviceRegistry.get().subscribe((pair, err) -> {
            serviceEvent(pair.car(), pair.cdr(), err);
        });
        heartBeat();
        Log.Info(this, "registered at serviceRegistry.");
    }
12961
private function registerServices(): void
    {
        $services = ExchangerRegistry::getServices();

        foreach ($services as $name => $class) {
            self::register($name, $class);
        }
    }
1113045
public static function register_providers()
    {
        $provider_instances = [];

        foreach (static::$container->get(Config::class)->get('services.providers') as $provider) {
            try {
                $provider = static::$container->resolve($provider);
                $provider->register();

                $provider_instances[] = $provider;
            } catch (Exception $e) {
                // Fail silently if in production, otherwise throw originalException.
                if (\defined('WP_DEBUG') && WP_DEBUG) {
                    throw new ContainerException($e->getMessage());
                }
            }
        }

        foreach ($provider_instances as $provider) {
            static::$container->resolve_method($provider, 'boot');
        }
    }
1042035
public function register()
    {
        $dependencies = [
            ArtisanServiceProvider::class,
            ContainersServiceProvider::class,
            EventServiceProvider::class,
            BreadcrumbsServiceProvider::class => [
                'Breadcrumbs' => BreadcrumbsFacade::class,
            ],
            HtmlServiceProvider::class => [
                'Html' => HtmlFacade::class,
                'Form' => FormFacade::class,
            ],
            PaperclipServiceProvider::class,
            MenusServiceProvider::class => [
                'AdminNav' => MenuFacade::class,
            ],
            GravatarServiceProvider::class => [
                'Gravatar' => Gravatar::class,
            ],
        ];

        array_walk($dependencies, function ($package, $provider) {
            if (is_string($package) && is_numeric($provider)) {
                $provider = $package;
                $package = null;
            }

            if (!$this->app->getProvider($provider)) {
                $this->app->register($provider);

                if (is_array($package)) {
                    foreach ($package as $alias => $facade) {
                        if (class_exists($alias)) {
                            continue;
                        }

                        class_alias($facade, $alias);
                    }
                }
            }
        });
    }
538979
protected function registerProviders()
    {
        /** @var Container $container */
        $container = $this->getContainer();

        // Register Aliases
        $aliases = (array) $this->get('di.aliases');

        foreach ($aliases as $alias => $target) {
            $container->alias($alias, $target);
        }

        $container->registerServiceProvider(new SystemProvider($this, $this->config));

        $providers = (array) $this->config->get('providers');

        foreach ($providers as $interface => &$provider) {
            if ($provider === false) {
                continue;
            }

            if (is_subclass_of($provider, ServiceProviderInterface::class)) {
                // Handle provider
                if ($provider instanceof ClassMeta || (is_string($provider) && class_exists($provider))) {
                    $provider = $container->newInstance($provider);
                }

                if ($provider === false) {
                    continue;
                }

                $container->registerServiceProvider($provider);

                if ($provider instanceof BootableProviderInterface
                    || method_exists($provider, 'boot')) {
                    $provider->boot($container);
                }
            } else {
                // Handle Service
                if (is_numeric($interface)) {
                    $container->prepareSharedObject($provider);
                } else {
                    $container->bindShared($interface, $provider);
                }
            }
        }

        foreach ($providers as $provider) {
            if ($provider === false) {
                continue;
            }

            if (is_subclass_of($provider, ServiceProviderInterface::class)
                && (
                    $provider instanceof BootableDeferredProviderInterface
                    || method_exists($provider, 'bootDeferred')
                )) {
                $provider->bootDeferred($container);
            }
        }
    }
923383
private void registerHandlers() {
    // Register TCP message handlers.
    bootstrapService.getMessagingService().registerHandler(MEMBERSHIP_SYNC, syncHandler, swimScheduler);
    bootstrapService.getMessagingService().registerHandler(MEMBERSHIP_PROBE, probeHandler, swimScheduler);
    bootstrapService.getMessagingService().registerHandler(MEMBERSHIP_PROBE_REQUEST, probeRequestHandler);

    // Register UDP message listeners.
    bootstrapService.getUnicastService().addListener(MEMBERSHIP_GOSSIP, gossipListener, swimScheduler);
  }
964717
private function registerServiceProviders()
    {
        $this->app->register( ArboryTranslationServiceProvider::class );
        $this->app->register( TranslatableServiceProvider::class );
        $this->app->register( ArboryFileServiceProvider::class );
        $this->app->register( ArboryAuthServiceProvider::class );
        $this->app->register( GlideImageServiceProvider::class );
        $this->app->register( AssetServiceProvider::class );
        $this->app->register( SettingsServiceProvider::class );
        $this->app->register( ExcelServiceProvider::class );
        $this->app->register( FileManagerServiceProvider::class );
    }
999624
protected function registerOAuthProviders()
	{
		$this->app->register(new FluentStorageServiceProvider($this->app));
		$this->app->register(new OAuth2ServerServiceProvider($this->app));
	}
1192709
protected function registerBaseServiceProviders()
    {
        $this->register(new EventServiceProvider($this));
        $this->register(new ActionServiceProvider($this));
        $this->register(new FilterServiceProvider($this));

        $this->register(new RoutingServiceProvider($this));
    }
618129
public final void register() {
        synchronized (lock) {
            if (serviceRegistration == null) {
                BundleClassResolver resolver = new BundleClassResolver();
                serviceRegistration = bundleContext.registerService(SERVICE_NAMES, resolver, serviceProperties);
            }
        }
    }
701497
public function register()
    {
        $this->app->singleton(Datatables::class);
        $this->app->singleton(GroupsFilterAdapter::class);
        $this->app->alias(Datatables::class, 'datatables');
    }
272962
public function registerObserverServiceProvider()
    {
        if (! $this->files->exists(app_path('Providers/ObserverServiceProvider.php'))) {
            $this->call('make:provider', [
                'name' => 'ObserverServiceProvider',
            ]);
            $this->info('Please register your ObserverServiceProvider in config/app.php.');
            $this->info('Do run php artisan config:cache to make sure ObserverServiceProvider is loaded.');
        } else {
            $this->info(app_path('Providers/ObserverServiceProvider.php') . ' already exist.');
        }
    }
21761
protected function registerBaseServiceProviders()
    {
        $this->register(ConfigServiceProvider::class);
        $this->register(ServerRequestCreatorServiceProvider::class);
        $this->register(HttpFactoriesServiceProvider::class);
        $this->register(LoggerServiceProvider::class);
        $this->register(RouterServiceProvider::class);
        $this->register(MiddlewaresServiceProvider::class);
        $this->register(ErrorHandlerServiceProvider::class);
    }