public function addProvider($name, ReindexProviderInterface $provider)
    {
        if (isset($this->providers[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Reindex provider with name "%s" has already been registered.',
                $name
            ));
        }

        $this->providers[$name] = $provider;
    }
public function addProvider($name, ReindexProviderInterface $provider)
    {
        if (isset($this->providers[$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Reindex provider with name "%s" has already been registered.',
                $name
            ));
        }

        $this->providers[$name] = $provider;
    }
public function addProvider ( $ name , ReindexProviderInterface $ provider ) { if ( isset ( $ this -> providers [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Reindex provider with name "%s" has already been registered.' , $ name ) ) ; } $ this -> providers [ $ name ] = $ provider ; }
Add a reindex provider to the registry.

@param string $name
@param ReindexProviderInterface $provider

@throws \InvalidArgumentException
Add a reindex provider to the registry .