public function using(string $name): self
    {
        if (!isset($this->providers[$name])) {
            throw ProviderNotRegistered::create($name ?? '', $this->providers);
        }

        $this->provider = $this->providers[$name];

        return $this;
    }
public function using(string $name): self
    {
        if (!isset($this->providers[$name])) {
            throw ProviderNotRegistered::create($name ?? '', $this->providers);
        }

        $this->provider = $this->providers[$name];

        return $this;
    }
public function using ( string $ name ) : self { if ( ! isset ( $ this -> providers [ $ name ] ) ) { throw ProviderNotRegistered :: create ( $ name ?? '' , $ this -> providers ) ; } $ this -> provider = $ this -> providers [ $ name ] ; return $ this ; }
Sets the default provider to use.

@param string $name

@return ProviderAggregator
Sets the default provider to use .