protected function setProvider($name, ThemeProviderInterface $provider) {
        $k = ObjectHelper::getShortName($name);
        $v = $this->getIndex()[$k];
        if (null !== $v) {
            $this->getProviders()[$v] = $provider;
            return $this;
        }
        $this->index[$k] = count($this->getProviders());
        return $this->addProvider($provider);
    }
protected function setProvider($name, ThemeProviderInterface $provider) {
        $k = ObjectHelper::getShortName($name);
        $v = $this->getIndex()[$k];
        if (null !== $v) {
            $this->getProviders()[$v] = $provider;
            return $this;
        }
        $this->index[$k] = count($this->getProviders());
        return $this->addProvider($provider);
    }
protected function setProvider ( $ name , ThemeProviderInterface $ provider ) { $ k = ObjectHelper :: getShortName ( $ name ) ; $ v = $ this -> getIndex ( ) [ $ k ] ; if ( null !== $ v ) { $ this -> getProviders ( ) [ $ v ] = $ provider ; return $ this ; } $ this -> index [ $ k ] = count ( $ this -> getProviders ( ) ) ; return $ this -> addProvider ( $ provider ) ; }
Set a provider.

@param mixed $name The name.
@param ThemeProviderInterface $provider The provider.
@return ManagerInterface Returns this manager.
@throws ReflectionException Throws a reflection exception if an error occurs.
Set a provider .