public function addProvider(ProviderInterface $provider)
    {
        if (array_key_exists($name = $provider->getName(), $this->providers)) {
            throw new \InvalidArgumentException("Wide search provider '{$name}' is already registered.");
        }

        $this->providers[$name] = $provider;
    }
public function addProvider(ProviderInterface $provider)
    {
        if (array_key_exists($name = $provider->getName(), $this->providers)) {
            throw new \InvalidArgumentException("Wide search provider '{$name}' is already registered.");
        }

        $this->providers[$name] = $provider;
    }
public function addProvider ( ProviderInterface $ provider ) { if ( array_key_exists ( $ name = $ provider -> getName ( ) , $ this -> providers ) ) { throw new \ InvalidArgumentException ( "Wide search provider '{$name}' is already registered." ) ; } $ this -> providers [ $ name ] = $ provider ; }
Adds the provider.

@param ProviderInterface $provider
Adds the provider .