Register providers.
428981
public function register()
    {
        $this->app->bind(Repository::class, function ($app) {
            return new ThemeRepository($app->make('config'));
        });

        $this->app->singleton(Themer::class, function ($app) {
            return new Themer($app->make('config'), $app->make('request'), $app->make(ThemeRepository::class));
        });

        $this->app->singleton(Styles::class, function ($app) {
            return new Styles($app->make(Themer::class), $app->make('config'), $app->make('log'), $app->make(Url::class));
        });

        $this->app->singleton(Scripts::class, function ($app) {
            return new Scripts($app->make(Themer::class), $app->make('config'), $app->make('log'), $app->make(Url::class));
        });

        $this->app->singleton(Images::class, function ($app) {
            return new Images($app->make(Themer::class), $app->make('config'), $app->make('log'), $app->make(Url::class));
        });
    }
33282
private function registerProviders()
    {
        $this->providers = $this->defaultProviders;

        $providers = [];
        foreach($this->providers as $provider) {
            if ($provider === 'EasyWeChat\Foundation\ServiceProviders\OpenPlatformServiceProvider') {
                continue;
            }

            $providers[] = $provider;
        }

        $this->providers = $providers;

        if ($this['config']['auth_type'] === Config::AUTH_TYPE_COMPONENT) {
            $providers = [];
            foreach($this->providers as $provider) {
                if ($provider === 'EasyWeChat\Foundation\ServiceProviders\ServerServiceProvider'
                    || $provider === 'EasyWeChat\Foundation\ServiceProviders\OAuthServiceProvider') {
                    continue;
                }

                $providers[] = $provider;
            }

            $this->providers = $providers;

            array_push($this->providers, ServiceProviders\OAuthServiceProvider::class);
            array_push($this->providers, ServiceProviders\ServerServiceProvider::class);
        }

        foreach ($this->providers as $provider) {
            $this->register(new $provider());
        }
    }
498997
private function registerProvider()
    {
        $app = $this->app;

        // Pick the correct service provider for the current verison of Laravel
        $this->provider = (version_compare($app::VERSION, '5.0', '<'))
            ? new ImgurServiceProviderLaravel4($app)
            : new ImgurServiceProviderLaravel5($app);
    }
481880
public function register()
    {
        $this->registerRouter();

        $this->registerUrlGenerator();

        $this->registerRedirector();

        $this->registerResponseFactory();

        $this->registerControllerDispatcher();
    }
1192297
public function registerConfiguredProviders()
    {
        $providers = $this['config']->get('app.providers', []);

        foreach ($providers as $provider) {
            $this->register(new $provider($this));
        }
    }
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);
    }
760337
public function registerProvider(Provider $provider): self
    {
        $this->providers[$provider->getName()] = $provider;

        return $this;
    }
25248
public function register()
    {

        // Load the config file and merge it with the user's (should it get published)
        $this->mergeConfigFrom( __DIR__.'/../../../config/FHIRConfig.php', 'FHIRConfig');

        // Register command
        $this->commands($this->commands);

        // Bind the LibreEHR implementations to the interface

        $this->app->bind('LibreEHR\Core\Contracts\FinderInterface', 'LibreEHR\Core\Emr\Finders\Finder');


        // Set up Patient binding
        $this->app->bind('LibreEHR\Core\Contracts\PatientInterface', 'LibreEHR\Core\Emr\Eloquent\PatientData', function( $app ) {
            return new \LibreEHR\Core\Emr\Eloquent\PatientData();
        });

        // Set up Appointment binding
        $this->app->bind('LibreEHR\Core\Contracts\AppointmentInterface', 'LibreEHR\Core\Emr\Eloquent\AppointmentData', function( $app ) {
            return new \LibreEHR\Core\Emr\Eloquent\AppointmentData();
        });

        $this->app->bind('LibreEHR\Core\Contracts\ProviderInterface', 'LibreEHR\Core\Emr\Eloquent\ProviderData', function( $app ) {
            return new \LibreEHR\Core\Emr\Eloquent\ProviderData();
        });

        $this->app->bind('LibreEHR\Core\Contracts\PharmacyInterface', 'LibreEHR\Core\Emr\Eloquent\PharmacyData', function( $app ) {
            return new \LibreEHR\Core\Emr\Eloquent\PharmacyData();
        });

        // When AppointmentController needs Adapter Logic point IoC to give the FHIRScheduleAdapter
        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\SlotController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRSlotAdapter' );

        // When Adapter needs Repository Logic point IoC to give the AppointmentRepository
        $this->app->when( 'LibreEHR\FHIR\Adapters\FHIRSlotAdapter' )
            ->needs( 'LibreEHR\Core\Contracts\RepositoryInterface' )
            ->give( 'LibreEHR\Core\Emr\Repositories\AppointmentRepository' );

        // When AppointmentController needs Adapter Logic point IoC to give the FHIRScheduleAdapter
        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\ScheduleController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRScheduleAdapter' );

        // When Adapter needs Repository Logic point IoC to give the AppointmentRepository
        $this->app->when( 'LibreEHR\FHIR\Adapters\FHIRScheduleAdapter' )
            ->needs( 'LibreEHR\Core\Contracts\RepositoryInterface' )
            ->give( 'LibreEHR\Core\Emr\Repositories\AppointmentRepository' );

        // When AppointmentController needs Adapter Logic point IoC to give the FHIRSlotAdapter
        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\SlotController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRSlotAdapter' );

        // When Adapter needs Repository Logic point IoC to give the AppointmentRepository
        $this->app->when( 'LibreEHR\FHIR\Adapters\FHIRSlotAdapter' )
            ->needs( 'LibreEHR\Core\Contracts\RepositoryInterface' )
            ->give( 'LibreEHR\Core\Emr\Repositories\AppointmentRepository' );

        // When AppointmentController needs Adapter Logic point IoC to give the FHIRAppointmentAdapter
        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\AppointmentController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRAppointmentAdapter' );

        // When Adapter needs Repository Logic point IoC to give the AppointmentRepository
        $this->app->when( 'LibreEHR\FHIR\Adapters\FHIRAppointmentAdapter' )
            ->needs( 'LibreEHR\Core\Contracts\RepositoryInterface' )
            ->give( 'LibreEHR\Core\Emr\Repositories\AppointmentRepository' );

        // When AppointmentController needs Adapter Logic point IoC to give the FHIRProfileAdapter
        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\ProfileController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRProfileAdapter' );

        // When Adapter needs Repository Logic point IoC to give the ProfileRepository
        $this->app->when( 'LibreEHR\FHIR\Adapters\FHIRProfileAdapter' )
            ->needs( 'LibreEHR\Core\Contracts\RepositoryInterface' )
            ->give( 'LibreEHR\Core\Emr\Repositories\ProfileRepository' );

        // When RegisterController needs Adapter Logic point IoC to give the FHIRPatientAdapter
        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\RegisterController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRPatientAdapter' );

        // When PatientController needs Adapter Logic point IoC to give the FHIRPatientAdapter
        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\PatientController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRPatientAdapter' );

        // When Adapter needs Repository Logic point IoC to give the PatientRepository
        $this->app->when( 'LibreEHR\FHIR\Adapters\FHIRPatientAdapter' )
            ->needs( 'LibreEHR\Core\Contracts\RepositoryInterface' )
            ->give( 'LibreEHR\Core\Emr\Repositories\PatientRepository' );


        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\BundleController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRBundleAdapter' );

        
        // When PatientController needs Adapter Logic point IoC to give the FHIRPatientAdapter
        $this->app->when( 'LibreEHR\FHIR\Http\Controllers\ValuesetController' )
            ->needs( 'LibreEHR\Core\Contracts\BaseAdapterInterface' )
            ->give( 'LibreEHR\FHIR\Adapters\FHIRValueSetAdapter' );

        // When Adapter needs Repository Logic point IoC to give the ProviderRepository
        $this->app->when( 'LibreEHR\FHIR\Adapters\FHIRValueSetAdapter' )
            ->needs( 'LibreEHR\Core\Contracts\RepositoryInterface' )
            ->give( 'LibreEHR\Core\Emr\Repositories\ProviderRepository' );

        // When Adapter needs Repository Logic point IoC to give the PharmacyRepository
        $this->app->when( 'LibreEHR\FHIR\Adapters\FHIRValueSetAdapter' )
            ->needs( 'LibreEHR\Core\Contracts\RepositoryInterface' )
            ->give( 'LibreEHR\Core\Emr\Repositories\PharmacyRepository' );


        // Set up document binding
        $this->app->bind('LibreEHR\Core\Contracts\DocumentRepositoryInterface', 'LibreEHR\Core\Emr\Repositories\DocumentRepository');
        $this->app->bind('LibreEHR\Core\Contracts\DocumentInterface', 'LibreEHR\Core\Emr\Eloquent\Document', function( $app ) {
            return new \LibreEHR\Core\Emr\Eloquent\Document();
        });


        // Set up Audit Event binding
        $this->app->bind('LibreEHR\Core\Contracts\AuditEventRepositoryInterface', 'LibreEHR\Core\Emr\Repositories\AuditEventRepository');
        $this->app->bind('LibreEHR\Core\Contracts\AuditEventInterface', 'LibreEHR\Core\Emr\Eloquent\AuditEvent', function( $app ) {
            return new \LibreEHR\Core\Emr\Eloquent\AuditEvent();
        });

        $this->app->bind('LibreEHR\Core\Contracts\AuditEventAdapterInterface', 'LibreEHR\FHIR\Adapters\FHIRAuditEventAdapter');

        // This will load routes file at vendor/[vendor]/[package]/src/Http/routes.php
        // and prepend it with Foo\Http\Controllers namespace
        $this->app['router']->group(['namespace' => 'LibreEHR\FHIR\Http\Controllers'], function () {
            require __DIR__ . '/../../Http/routes.php';
        });
    }
428284
public function register()
    {
        $loader = AliasLoader::getInstance();

        // Register aliases
        foreach ($this->getAliases() as $alias => $class) {
            $loader->alias($alias, $class);
        }

        // Register service containers
        foreach ($this->getServiceContainers() as $abstract => $concrete) {
            $this->app->singleton($abstract, $concrete);
        }
    }
1213158
protected function registerServices()
    {
        foreach (Antvel::bindings() as $key => $value) {
            is_numeric($key)
                ? $this->app->singleton($value)
                : $this->app->singleton($key, $value);
        }
    }
224132
public function register() : void
    {
        $environment = $this->app->environment();

        $providers = $this->app['config']->get('app.' . $environment . '_providers', []);

        foreach ($providers as $provider) {
            $this->app->register($provider);
        }

        $facades = $this->app['config']->get('app.' . $environment . '_aliases', []);

        foreach ($facades as $class => $name) {
            AliasLoader::getInstance()->alias($class, $name);
        }
    }
1068982
private function registerProviders()
    {
        $providers = $this->config('app')['providers'];
        foreach ($providers as $provider) {
            $obj = new $provider($this);

            if (!$obj instanceof Provider) {
                throw new \Exception("Invalid provider: $provider");
            }

            $this->container->invoke($obj, 'register');
        }
    }
994111
public function register()
    {
        // Auto register the support service provider
        if (! get_class($this) == SupportServiceProvider::class) {
            $this->app->register(SupportServiceProvider::class);
        }

        $this->viewsPath  = Str::replace($this->viewsPath, '{resourcesPath}', $this->getResourcesPath());
        $this->assetsPath = Str::replace($this->assetsPath, '{resourcesPath}', $this->getResourcesPath());

        $router = $this->app->make('router');
        $kernel = $this->app->make('Illuminate\Contracts\Http\Kernel');

        $this->registerConfigFiles();

        foreach ($this->prependMiddleware as $middleware) {
            $kernel->prependMiddleware($middleware);
        }

        foreach ($this->middleware as $middleware) {
            $kernel->pushMiddleware($middleware);
        }

        foreach ($this->routeMiddleware as $key => $middleware) {
            $router->middleware($key, $middleware);
        }

        foreach ($this->providers as $provider) {
            $this->app->register($provider);
        }

        foreach ($this->deferredProviders as $provider) {
            $this->app->registerDeferredProvider($provider);
        }

        foreach ($this->bindings as $binding => $class) {
            $this->app->bind($binding, $class);
        }

        foreach ($this->singletons as $binding => $class) {
            if ($this->strict && ! class_exists($class) && ! interface_exists($class)) {
                throw new \Exception(get_called_class() . ": Could not find alias class [{$class}]. This exception is only thrown when \$strict checking is enabled");
            }
            $this->app->singleton($binding, $class);
        }

        foreach ($this->aliases as $alias => $full) {
            if ($this->strict && ! class_exists($full) && ! interface_exists($full)) {
                throw new \Exception(get_called_class() . ": Could not find alias class [{$full}]. This exception is only thrown when \$strict checking is enabled");
            }
            $this->app->alias($alias, $full);
        }

        if (is_array($this->commands) and count($this->commands) > 0) {
            $this->commands($this->commands);
        }

        AliasLoader::getInstance($this->facades)->register();

        $this->requireHelpersFor('register');

        return $this->app;
    }
677248
public function register()
    {
        $this->instances = [];

        foreach ($this->providers as $provider) {
            Zilf::$container->register($provider, $provider);
            $this->instances[] = Zilf::$container->get($provider)->register();
        }
    }
391340
protected function registerConfiguredServiceProviders()
    {
        $providers = $this->collectConfiguredServiceProviders();

        foreach ($providers as $provider) {
            $this->app->register($provider);
        }

        return $this;
    }
944738
public function registerProviders()
	{
		$providers = $this['config']->get('app.providers');

		foreach ($providers as $provider) {
			$this->providers[$provider] = new $provider($this);
			$this->providers[$provider]->register();
		}
	}
477085
public function register()
    {
        Framework::registerPackage('framework');

        // Register 3rd party providers
        $this->app->register(WidgetServiceProvider::class);

        $this->app->register(HelloquentServiceProvider::class);
        $this->app->register(ViewServiceProvider::class);
        $this->app->register(HttpServiceProvider::class);
        $this->app->register(StatisticsServiceProvider::class);
        $this->app->register(DynatableServiceProvider::class);
    }