public function baseFor($iri, $schemaRelative = false)
    {
        if (false === ($iri instanceof IRI)) {
            $iri = new IRI($iri);
        }

        return $iri->relativeTo($this, $schemaRelative);
    }
public function baseFor($iri, $schemaRelative = false)
    {
        if (false === ($iri instanceof IRI)) {
            $iri = new IRI($iri);
        }

        return $iri->relativeTo($this, $schemaRelative);
    }
public function baseFor ( $ iri , $ schemaRelative = false ) { if ( false === ( $ iri instanceof IRI ) ) { $ iri = new IRI ( $ iri ) ; } return $ iri -> relativeTo ( $ this , $ schemaRelative ) ; }
Convert an IRI to a relative IRI reference using this IRI as base

This method provides a more convenient interface than the
{@link IRI::relativeTo()} method if the base IRI stays the same while
the IRIs to convert to relative IRI references change.

@param  string|IRI $iri The IRI to convert to a relative reference
@param bool             Defines whether schema-relative IRIs such
as `//example.com` should be created (`true`)
or not (`false`).

@throws \InvalidArgumentException If an invalid IRI is passed.

@see \ML\IRI\IRI::relativeTo()

@return IRI      The relative IRI reference
Convert an IRI to a relative IRI reference using this IRI as base