public function addProvider($providerDefinition): void
    {
        $provider = $this->buildProvider($providerDefinition);

        if ($provider instanceof DeferredServiceProviderInterface) {
            $this->deferredProviders->attach($provider);
        } else {
            $provider->register();
        }
    }
public function addProvider($providerDefinition): void
    {
        $provider = $this->buildProvider($providerDefinition);

        if ($provider instanceof DeferredServiceProviderInterface) {
            $this->deferredProviders->attach($provider);
        } else {
            $provider->register();
        }
    }
public function addProvider ( $ providerDefinition ) : void { $ provider = $ this -> buildProvider ( $ providerDefinition ) ; if ( $ provider instanceof DeferredServiceProviderInterface ) { $ this -> deferredProviders -> attach ( $ provider ) ; } else { $ provider -> register ( ) ; } }
Adds service provider to the container. Unless service provider is deferred
it would be immediately registered.

@param string|array $providerDefinition

@throws InvalidConfigException
@throws NotInstantiableException
@see ServiceProvider
@see DeferredServiceProvider
Adds service provider to the container . Unless service provider is deferred it would be immediately registered .