Register the given provider.

@param Closure|string $provider
960809
public function register($provider)
    {
        // When we receive a string we consider it to be a provider, if not we throw them away!
        if (is_string($provider) && !is_a($provider, '\Vinelab\Minion\Provider', true)) {
            throw new InvalidProviderException(
                sprintf('Provider %s must be an instance of \Vinelab\Minion\Provider', $provider)
            );
        }

        if (!in_array($provider, $this->providers)) {
            $this->providers[] = $provider;
        }
    }
669311
public function addProvider($provider) {
        $this->validateProvider($provider);

        if (is_object($provider)) {
            $class = get_class($provider);
            $instance = $provider;
        } else {
            $class = $provider;
            $instance = null;
        }

        if ( ! array_has($this->providers, $class)) {
            $this->providers[$class] = [
                'instance' => $instance,
                'tags' => [],
            ];
        }
    }
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);
            }
        }
    }
781555
public function register($alias, \Closure $closure)
    {
        if (!is_string($alias))
            throw new Exception('Application::register() requires a string as the first parameter.');
        
        $this->registered[$alias] = $closure;
        
        return true;
    }
734069
public function register($event, $listener, \Closure $callback)
    {
        if (!isset($this->events[$event])) {
            $this->events[$event] = [];
        }

        if ($listener) {
            $this->events[$event][$listener] = $callback;
        } else {
            $this->events[$event][] = $callback;
            $keys = array_keys($this->events[$event]);
            $listener = array_pop($keys);
        }

        return $listener;
    }
907238
def register_provider(cls, provider):
        """"""
        def decorator(subclass):
            """Register as decorator function."""
            cls._providers[provider] = subclass
            subclass.name = provider
            return subclass
        return decorator
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);
    }
1255106
public function registerProvider($provider){
        $providers = (array) $provider;

        foreach($providers as $provider){
            $this->app()['config']->add('general.providers', $provider);
        }
    }
732223
public function add($provider)
    {
        if(is_object($provider) && $provider instanceof Provider)
            return $this->register($provider);

        if($this->lateRegistry == true)
        {
            $this->providers[$provider] = false;

            return $this;
        }

        if(method_exists($provider, 'provides') && is_array($dependencies = $provider::provides()) && count($dependencies) > 0)
            return $this->addDeferred($provider, $dependencies);

        $this->providers[$provider] = true;

        $this->register(new $provider);

        return $this;
    }
1408
function registerProviders () {
  Object.keys(settings.providers).forEach(function (id) {
    var providerConf = settings.providers[id]
    var provider = providers[id] ? providers[id] : providerConf

    var strategy = protocols.initialize(id, provider, providerConf)
    strategies[id] = strategy
  })
}
1138545
public function register($provider, $options = [], $force = false){
		if(!isset($this->providers[$provider]) || $force){
			$this->providers[$provider] = new $provider($this,$options);
			with($this->providers[$provider])->register();
		}
	}
412213
public function register($provider, array $values = [])
    {
        $key = \get_class($provider);
        if (!isset($this->registry[$key])) {
            parent::register($provider, $values);
            $this->registry[$key] = true;
        }
    }
432239
def register(self, provider):
        ''''''
        if isinstance(provider,type):
            provider = provider()
        self[provider.code] = provider
639175
protected function fromProvider($provider)
    {
        $provider = IOC::resolve($provider);
        $module = $provider->create();
        $this->add($provider->getName(), $module);
        return $module;
    }
913057
protected function addProvider($provider)
    {
        $className = $this->resolveProviderClass($provider);

        $this->providers[$provider] = $this->buildProvider($className);
    }
515176
public function provider( $provider ) {

		if ( is_string( $provider ) ) {
			$provider = $this->resolveProvider( $provider );
		}

		$this->providers[] = $provider;
	}
522654
public function register(ServiceProviderInterface $provider, array $values = [])
    {
        $this->providers[] = $provider;

        parent::register($provider, $values);

        return $this;
    }