Registers the service in the IoC Container
974342
public function register() {

        // Bind the returned class to the namespace 'Ooglee\Domain\Contracts\IHashingService'
        $this->app->singleton('Ooglee\Domain\Contracts\IHashingService', function($app)
        {
            //$hasher = $this->app['config']['ioc.app.hasher'];
            $hasher = \Config::get('ooglee::ioc.app.hasher');
            //return new HashingService(new HasherExample());
            return new HashingService(new $hasher);
        });
    }
390304
public function register()
    {   
        $providers = config('app','core_providers');
        foreach ($providers as $key => $value) {
            $this->getContainer()->add($value);
        }
    }
820078
@Override
    public void registerService(Class<?> clazz, Object service) {
        this.services.put(clazz, service);
    }
1326504
protected function registering()
    {
        $this->app->bindShared(ServiceShortCuts::RESOLVER_SERVICE, function () {
            return new Resolver($this->app);
        });

        $this->app->bindShared(ServiceShortCuts::GHOST_SERVICE, function () {
            return new GhostServices($this->app);
        });

        $this->app->bind(ServiceShortCuts::CORE_INITIALIZED, true);

        $this->app->booting(function () {
            $loader = AliasLoader::getInstance();

            foreach ($this->aliases as $facade => $facadeClass) {
                $loader->alias($facade, $facadeClass);
            }
        });
    }
573278
public static <T> void register(final Class<T> service) {
        for (T each : ServiceLoader.load(service)) {
            registerServiceClass(service, each);
        }
    }
1094817
public function register()
    {
        $container = $this->getContainer();
        $config    = $container->get('config');

        $container->share(Client::class)
            ->withArgument(new RawArgument([
                'base_uri' => $config->get('base_uri'),
                'handler'  => $container->get(HandlerStack::class),
            ]));

        if ($config->get('http_adapter') === GuzzleAdapter::class) {
            $container->share(AdapterInterface::class, function () use ($container) {
                return new GuzzleAdapter($container->get(Client::class));
            });
        }

        if ($config->get('http_adapter') === MockAdapter::class) {
            $path = realpath(__DIR__.'/../../tests/fixtures').'/';
            $container->share(AdapterInterface::class, new MockAdapter($path));
        }
    }
1045269
@Override
	public IServiceRegistration registerService(String clazz, Object service,
			Dictionary<String, String> properties) {
		final String sourceMethod = "registerService"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(PlatformServicesImpl.class.getName(), sourceMethod, new Object[]{clazz, service, properties});
		}
		ServiceRegistrationOSGi serviceRegistrationOSGi = null;
		ServiceRegistration<?> serviceRegistration = null;
		BundleContext bundleContext = Activator.getBundleContext();
		if (bundleContext != null) {
			serviceRegistration = bundleContext.registerService(clazz, service,
					properties);
			serviceRegistrationOSGi = new ServiceRegistrationOSGi(serviceRegistration);
		}
		if (isTraceLogging) {
			log.exiting(PlatformServicesImpl.class.getName(), sourceMethod, serviceRegistrationOSGi);
		}
		return serviceRegistrationOSGi;
	}
1017017
public function register(ContainerInterface $container, Configurable $config)
    {
        if ( ! $config instanceof Config) {
            throw new \InvalidArgumentException('Wrong Config object');
        }

        $requestFilter = new RequestFilter($config);

        $container->add($config->getServiceName(), $requestFilter);
    }
1150386
public function register()
    {
        $this->registerBindingsServiceProviderMakeCommand();
        $this->registerMakeCommand();
        $this->registerRepositoryInterfaceMakeCommand();
        $this->registerServiceMakeCommand();
        $this->registerTraitMakeCommand();
    }
1297731
def register_service(self, name: str, service: Any):
        
        if not isinstance(service, type):
            if hasattr(service, '__class__'):
                _ensure_service_name(service.__class__, name)
            self.services[name] = service
            return

        if self._services_initialized:
            from warnings import warn
            warn('Services have already been initialized. Please register '
                 f'{name} sooner.')
            return

        self._services_registry[_ensure_service_name(service, name)] = service
679500
public function register()
    {
        $this->app->singleton(SecurityContext::class);
        $this->app->bind(RepositoryFactory::class, function(Container $container){
            return
                new ContainerBindingRepositoryFactory($container,
                    new ConfigurationRepositoryFactory($container,
                        new DefaultRepositoryFactory($container)
                    )
                );
        });
    }
1145636
def register_service(cls, service):
        
        logger.debug('Registering service {0}'.format(service.name))
        return local_store.instance.register(service)
1189162
public function registerServiceProvider()
    {
        $this->registerConfig();
        $this->registerClassAliases();
        $this->registerHttpServiceProvider();
        $this->registerRoutingServiceProvider();
        $this->registerExceptionHandler();
        $this->registerDispatcher();
        $this->registerAuth();
        $this->registerTransformer();
        $this->registerDocsCommand();

        if (class_exists(\Illuminate\Foundation\Application::class, false)) {
            $this->commands([
                NodesConsoleCommandCache::class,
                NodesConsoleCommandRoutes::class,
            ]);
        }
    }
516938
public function boot()
  {
    if ($this->booted) return;
    
    $this->container = $container = new Container();
    
    $this->registerServices      ($container);
    $this->registerRoutes        ($container);
    $this->registerEventListeners($container);
    
    $this->booted = true;
  }
1023724
protected function init()
    {
        $this->setupContainer();
        $this->configure();
        $this->errorHandling();
        $this->registerServices();

        $this->initialized = true;
    }
607174
protected function registerServiceProviders()
    {
        foreach ($this->serviceProviders[$this->flare->compatibility()] as $class) {
            $this->app->register($class);
        }
    }
1146006
protected function registerServices()
    {
        $this->app->bind(
            'Xuma\Amaran\ViewBinder',
            'Xuma\Amaran\AmaranViewBinder'
        );

        $this->app->singleton('amaran', function($app) {
            $binder = new AmaranViewBinder($app['events']);

            return $this->app->make('Xuma\Amaran\AmaranHandler');
        });
    }