Registers a new provider to the aggregator.

@param Provider $provider

@return ProviderAggregator
760337
public function registerProvider(Provider $provider): self
    {
        $this->providers[$provider->getName()] = $provider;

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

        return $container;
    }
1185802
public function register(ServiceProviderInterface $provider, array $values = [])
    {
        $this->container->register($provider, $values);
        // register event subcriber
        if ($provider instanceof EventSubscriberInterface) {
            $this->eventSubscribers[] = $provider;
        }

        return $this;
    }
619442
public function register()
    {
        foreach ($this->modules as $module) {
            if ($aggregator = $module->getAttribute('aggregator')) {
                $this->container->register($aggregator);
            }
        }

        return $this;
    }
3876
public function addResourceProvider(ResourceProvider $provider)
    {
        $this->loaded && $this->loaded->__invoke();

        $this->resourceProviders[] = $provider;

        return $this;
    }
1102758
public function registerProvidersFor($binding)
    {
        foreach ($this->provides($binding) as $provider) {
            $this->registerProvider($provider, true, $binding);
        }
    }
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;
    }
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);
    }
1091981
public function registerDeferredProvider($provider, $service = null)
    {
        // Once the provider that provides the deferred service has been registered we
        // will remove it from our local list of the deferred services with related
        // providers so that this container does not try to resolve it out again.
        if ($service) {
            unset($this->deferredServices[$service]);
        }
        $this->registerProvider($instance = new $provider($this));
    }
140193
public HandlerRegistration register(Provider<?> provider) {
        final String typeName = provider.getType().getName();
        providers.put(typeName, provider);

        return new HandlerRegistration() {
            @Override
            public void removeHandler() {
                providers.remove(typeName);
            }
        };
    }
692592
protected function loadEagerServiceProvider($provider, array $options)
    {
        if (!$options['eager']) {
            return;
        }

        $instance = Arr::get($options, 'instance', $provider);

        $this->app->register($instance);
    }
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;
        }
    }
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;
    }
489644
public function newProvider(\ReflectionClass $provider, string $context) : DependencyProvider
    {
        $dependency = $this->newAnnotatedDependency($provider);

        return new DependencyProvider($dependency, $context);
    }
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;
    }
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' => [],
            ];
        }
    }
524262
protected function markAsRegistered($provider)
    {
        $this['events']->dispatch(\get_class($provider), [$provider]);

        parent::markAsRegistered($provider);
    }