Thruway\Subscription\PrefixMatcher::uriIsValid PHP Метод

uriIsValid() публичный Метод

public uriIsValid ( $uri, $options ) : boolean
$uri
$options
Результат boolean
    public function uriIsValid($uri, $options)
    {
        $uri = $this->fixupUri($uri);
        // if the uri is empty - then match everything
        if ($uri == "") {
            return true;
        }
        // if there is a trailing . then remove it and run it through the
        // regular validator
        $uri = substr($uri, strlen($uri) - 1) == "." ? substr($uri, 0, strlen($uri) - 1) : $uri;
        // allow matches to a normal URI or one with a trailing dot
        return Utils::uriIsValid($uri) || Utils::uriIsValid($uri . ".");
    }