src/Url.php
public static function isValidRelative(string $url, UrlInterface $baseUrl): bool
    {
        try {
            return self::myParse($baseUrl, $url);
        } catch (UrlPathLogicException $exception) {
            return false;
        }
    }
public static function isValidRelative(string $url, UrlInterface $baseUrl): bool
    {
        try {
            return self::myParse($baseUrl, $url);
        } catch (UrlPathLogicException $exception) {
            return false;
        }
    }
public static function isValidRelative ( string $ url , UrlInterface $ baseUrl ) : bool { try { return self :: myParse ( $ baseUrl , $ url ) ; } catch ( UrlPathLogicException $ exception ) { return false ; } }
Checks if a relative url is valid.

@since 1.0.0

@param string       $url     The url.
@param UrlInterface $baseUrl The base url.

@return bool True if the $url parameter is a valid url, false otherwise.
Checks if a relative url is valid .