public function check($uri)
    {
        $url = parse_url($uri);
        if (isset($url['query'])) {
            parse_str($url['query'], $params);
        } else {
            $params = [];
        }

        if (empty($params[$this->parameter])) {
            return false;
        }

        $hash = $params[$this->parameter];
        unset($params[$this->parameter]);

        return $this->computeHash($this->buildUrl($url, $params)) === $hash;
    }
public function check($uri)
    {
        $url = parse_url($uri);
        if (isset($url['query'])) {
            parse_str($url['query'], $params);
        } else {
            $params = [];
        }

        if (empty($params[$this->parameter])) {
            return false;
        }

        $hash = $params[$this->parameter];
        unset($params[$this->parameter]);

        return $this->computeHash($this->buildUrl($url, $params)) === $hash;
    }
public function check ( $ uri ) { $ url = parse_url ( $ uri ) ; if ( isset ( $ url [ 'query' ] ) ) { parse_str ( $ url [ 'query' ] , $ params ) ; } else { $ params = [ ] ; } if ( empty ( $ params [ $ this -> parameter ] ) ) { return false ; } $ hash = $ params [ $ this -> parameter ] ; unset ( $ params [ $ this -> parameter ] ) ; return $ this -> computeHash ( $ this -> buildUrl ( $ url , $ params ) ) === $ hash ; }
Checks that a URI contains the correct hash.

@param string $uri A signed URI

@return bool True if the URI is signed correctly, false otherwise
Checks that a URI contains the correct hash .