Registers a provider.

@param  \SmsSender\Provider\ProviderInterface $provider
@return \SmsSender\SmsSenderInterface
968559
public function registerProvider(ProviderInterface $provider)
    {
        if (null !== $provider) {
            $this->providers[$provider->getName()] = $provider;
        }

        return $this;
    }
702940
public function register()
    {
        // Register providers.
        $this->app->singleton('geoip', function (Application $app) {
            return new GeoIP($app['config'], $app["session.store"]);
        });
        $this->app->singleton('command.geoip.update', function (Application $app) {
            return new UpdateCommand($app['config']);
        });
        $this->commands(['command.geoip.update']);
    }
885305
public function registerProvider(ProviderInterface $provider, $lifeTime = 3600)
    {
        if (!$lifeTime instanceof \DateInterval) {
            $lifeTime = new \DateInterval(sprintf('PT%dS', $lifeTime));
        }

        $this->providers[$provider->getName()] = array('provider' => $provider, 'lifeTime' => $lifeTime);
    }
385806
public function getProvider($provider)
    {
        // Check if an instance has already been initiated. If not
        // build it and then add to the providers array.
        if (!isset($this->providers[$provider])) {
            $this->addProvider($provider);
        }

        return $this->providers[$provider];
    }
362080
public function registerProvider(DataTablesProviderInterface $provider) {
        if (true === $this->exists($provider->getName())) {
            throw new AlreadyRegisteredDataTablesProviderException($provider->getName());
        }
        $this->index[$provider->getName()] = $this->size();
        return $this->addProvider($provider);
    }
143430
public function handleConsumer($provider)
    {
        $this->consumer = new DataStructures\Consumer();

        if (false !== ($consumer = $this->model->findConsumer(['key' => $provider->consumer_key]))) {
            $this->consumer->id = $consumer->id;
            $this->consumer->key = $consumer->key;
            $this->consumer->secret = $provider->consumer_secret = $consumer->secret;
            $this->consumer->status = $consumer->status;

            if ($consumer->status === 'ENABLED') {
                return OAUTH_OK;
            }

            $this->addError(OAUTH_CONSUMER_KEY_REFUSED, language()->getLine('OAUTH_CONSUMER_KEY_REFUSED'));

            return OAUTH_CONSUMER_KEY_REFUSED;
        }

        if (empty($this->oauth->bearer)) {
            $this->addError(OAUTH_CONSUMER_KEY_UNKNOWN, language()->getLine('OAUTH_CONSUMER_KEY_UNKNOWN'));
        } else {
            $this->addError(OAUTH_CONSUMER_KEY_UNKNOWN, language()->getLine('OAUTH_AUTHORIZATION_UNKNOWN'));
        }

        return OAUTH_CONSUMER_KEY_UNKNOWN;
    }
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);
    }
1212390
public function register()
    {
        $this->mergeConfigFrom(
            __DIR__.'/../config/sms.php', 'sms'
        );

        $this->app->singleton(SMSManager::class, function () {
            return new SMSManager($this->app);
        });
    }
613042
public function register()
    {

        $app = $this->app;

        foreach ($app->getProviders() as $provider) {

            $provider = new $provider($app);

            if (!$provider instanceof ServiceProvider) {
                throw new ProviderException(sprintf('Your %s proiver must be a instance of ServiceProvider', get_class($provider)));
            }


            $provider->register();

            $app = $provider->app();
        }
    }
1285299
public function registerServices(ServiceProviderInterface $serviceProvider)
    {
        $services = $serviceProvider->getServices();      
        foreach ($services as $id => $service) {
            if ($this->has($id) == false) {
                $this->set($id, $service);
            }
        }
    }
580093
public function addProvider(Provider $provider)
    {
        $name = $provider->getName();
        if (isset($this->providers[$name])) {
            throw new \LogicException(sprintf('Trying to register two providers with the same name "%s"', $name));
        }
        $this->providers[$name] = $provider;
        
        return $this;
    }
268333
protected function registerProvides(ServiceProvider $provider)
    {
        foreach ($provider->provides() as $binding) {
            $this->provides[$binding][] = $provider;
        }
    }
631672
public function setProvider( $provider )
	{
		if ( $provider == $this->getProvider() ) { return; }

		$this->_values['provider'] = (string) $provider;
		$this->setModified();
	}
488161
public function register($provider)
    {
        if (! $provider instanceof ServiceProvider) {
            $provider = new $provider($this);
        }

        if (array_key_exists($providerName = get_class($provider), $this->loadedProviders)) {
            return;
        }

        $this->loadedProviders[$providerName] = true;

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

        if (method_exists($provider, 'boot')) {
            return $this->call([$provider, 'boot']);
        }
    }
1168187
public <T extends RESTDataProvider> void registerProvider(Class<T> providerClass, Class<?> providerInterface) {
        try {
            final Constructor<T> constructor = providerClass.getConstructor(RESTProviderFactory.class);
            final T instance = constructor.newInstance(this);

            providerMap.put(providerClass, instance);
            if (providerInterface != null) {
                providerMap.put(providerInterface, instance);
            }
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
    }
782605
public function register(Application $application)
    {
        $provider = $this->getProvider();
        $config   = $this->getConfig();

        return $application->register(new $provider(), $config->process());
    }
944738
public function registerProviders()
	{
		$providers = $this['config']->get('app.providers');

		foreach ($providers as $provider) {
			$this->providers[$provider] = new $provider($this);
			$this->providers[$provider]->register();
		}
	}