src/CfdiUtils/XmlResolver/XmlResolver.php
public function newRetriever(string $type)
    {
        if (! $this->hasLocalPath()) {
            throw new \LogicException('Cannot create a retriever if no local path was found');
        }
        if (static::TYPE_XSLT === $type) {
            return $this->newXsltRetriever();
        }
        if (static::TYPE_XSD === $type) {
            return $this->newXsdRetriever();
        }
        if (static::TYPE_CER === $type) {
            return $this->newCerRetriever();
        }
        return null;
    }
public function newRetriever(string $type)
    {
        if (! $this->hasLocalPath()) {
            throw new \LogicException('Cannot create a retriever if no local path was found');
        }
        if (static::TYPE_XSLT === $type) {
            return $this->newXsltRetriever();
        }
        if (static::TYPE_XSD === $type) {
            return $this->newXsdRetriever();
        }
        if (static::TYPE_CER === $type) {
            return $this->newCerRetriever();
        }
        return null;
    }
public function newRetriever ( string $ type ) { if ( ! $ this -> hasLocalPath ( ) ) { throw new \ LogicException ( 'Cannot create a retriever if no local path was found' ) ; } if ( static :: TYPE_XSLT === $ type ) { return $ this -> newXsltRetriever ( ) ; } if ( static :: TYPE_XSD === $ type ) { return $ this -> newXsdRetriever ( ) ; } if ( static :: TYPE_CER === $ type ) { return $ this -> newCerRetriever ( ) ; } return null ; }
Create a new retriever depending on the type parameter, only allow TYPE_XSLT and TYPE_XSD
@param string $type
@return RetrieverInterface|null
Create a new retriever depending on the type parameter only allow TYPE_XSLT and TYPE_XSD