Register a new data provider. *provider* must be an instance of
    DataProvider. If provider name is already available, it will be replaced.
432239
def register(self, provider):
        ''''''
        if isinstance(provider,type):
            provider = provider()
        self[provider.code] = provider
1121111
protected function registerService()
	{
	    $this->app->singleton($this->getProviderKey(), function($app)
	    {
	    	return new Service($this->getProviderKey(), new DataSource(new Model()));
	    });
	}
444739
@Override
    public void registerResourceProvider(ResourceProvider provider) {
	provider.setResources(this);
	String scheme = provider.getScheme();
	if (StringUtil.isEmpty(scheme)) return;

	ResourceProviderFactory[] tmp = new ResourceProviderFactory[resources.length + 1];
	for (int i = 0; i < resources.length; i++) {
	    if (scheme.equalsIgnoreCase(resources[i].getScheme())) {
		resources[i] = new ResourceProviderFactory(this, provider);
		return;
	    }
	    tmp[i] = resources[i];
	}
	tmp[resources.length] = new ResourceProviderFactory(this, provider);
	resources = tmp;
    }
576864
def register(cls, instance_class, name=None):
        
        if name is None:
            name = instance_class.__name__
        cls.INSTANCE_CLASSES[name] = instance_class
1101271
def unregister(self, provider):
        '''
        '''
        if isinstance(provider, type):
            provider = provider()
        if isinstance(provider, DataProvider):
            provider = provider.code
        return self.pop(str(provider).upper(), None)
64989
def register(self, subscriber):
        
        assert isinstance(subscriber, RequestHandler)
        logger.debug('New subscriber')
        self.subscribers.add(subscriber)
783178
protected function registerJwTProvider()
    {
        $this->app->singleton('afroware.jwT.provider.jwT', function ($app) {
            $provider = $this->config('providers.jwT');

            return new $provider(
                $this->config('secret'),
                $this->config('algo'),
                $this->config('keys')
            );
        });
    }
869387
def register_provider(self, specification, provider):
        
        if provider.scope is not None and provider.scope not in self.scopes:
            raise UnknownScopeError(provider.scope)
        self.providers[specification] = provider
105393
private function registerProviders ()
    {
        $this->register(new TwigServiceProvider());
        $this->register(new UrlGeneratorServiceProvider());
        $this->register(new ServiceControllerServiceProvider());
    }
717572
public void register(Delta delta) {
		final IResourceDescription newDesc = delta.getNew();
		if (newDesc == null) {
			removeDescription(delta.getUri());
		} else {
			addDescription(delta.getUri(), newDesc);
		}
	}
986618
public void unregisterProvider(Object provider) {
		if (provider != null) {
			Collection<Object> providerList = new ArrayList<>(1);
			providerList.add(provider);
			unregisterProviders(providerList);
		}
	}
1002833
public function registerProvider($provider)
    {
        if (($provider = $this->getProvider($provider))) {
        } elseif (is_string($provider)) {
            $provider = $this->resolveProvider($provider);
        }

        if ($this->registeredProvider($provider)) {
            return $provider;
        }

        if (method_exists($provider, 'register')) {
            $provider->register();
        }

        $this->markAsRegistered($provider);

        // If the application has already booted, we will call this boot method on
        // the provider class so it has an opportunity to do its boot logic and
        // will be ready for any usage by this developer's application logic.
        if ($this->booted) {
            $this->bootProvider($provider);
        }
        return $provider;
    }
865767
public function register($provider, $options = [], $force = false)
    {
        $instance = new $provider($this);
        if (method_exists($instance, 'register')) {
            $this->call([$instance, 'register']);
        }
        $this->providers[$provider] = $instance;
    }
701662
public function addProvider($provider)
    {
        if (is_string($provider)) {
            $provider = new $provider($this);
        }

        // Only allow a service provider to be registered
        // once.
        if (in_array($provider, $this->providers)) {
            return;
        }

        $this->providers[] = $provider;

        $this->registerEvents($provider);
        $this->registerProvides($provider);

        $this->registerProvider($provider);
    }
852572
public DataLoaderRegistry register(String key, DataLoader<?, ?> dataLoader) {
        dataLoaders.put(key, dataLoader);
        return this;
    }
925363
public function register(ServiceProviderInterface $provider)
    {
        $provider->register($this);
        $this->providers[get_class($provider)] = $provider;
    }
598451
def register_provider(self, func):
        
        if 'provides' not in getattr(func, '__di__', {}):
            raise DiayException('function %r is not a provider' % func)

        self.factories[func.__di__['provides']] = func