/**
* @param $uri
* @param $options
* @return bool
*/
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 . ".");
}