public function setResolver(string $type, SubResolver $resolver)
    {
        if (!isset($this->resolvers[$type]))
            throw new \InvalidArgumentException("Unknown resolver type: " . $type);

        if ($this->cache !== null)
            $resolver->setCache($this->cache);

        $this->resolvers[$type]['resolver'] = $resolver;
        return $this;
    }
public function setResolver(string $type, SubResolver $resolver)
    {
        if (!isset($this->resolvers[$type]))
            throw new \InvalidArgumentException("Unknown resolver type: " . $type);

        if ($this->cache !== null)
            $resolver->setCache($this->cache);

        $this->resolvers[$type]['resolver'] = $resolver;
        return $this;
    }
public function setResolver ( string $ type , SubResolver $ resolver ) { if ( ! isset ( $ this -> resolvers [ $ type ] ) ) throw new \ InvalidArgumentException ( "Unknown resolver type: " . $ type ) ; if ( $ this -> cache !== null ) $ resolver -> setCache ( $ this -> cache ) ; $ this -> resolvers [ $ type ] [ 'resolver' ] = $ resolver ; return $ this ; }
Replace a resolver with a custom instance
@param string $type The resolver to replace
@param SubResolver $resolver The SubResolver instance
@return Resolver Provides fluent interface
Replace a resolver with a custom instance