public function sign(string
$uri): string
{ $url =
parse_url($uri);
$params =
[];
if (isset($url['query'
])) { parse_str($url['query'
],
$params);
} $uri =
$this->
buildUrl($url,
$params);
$params[$this->parameter
] =
$this->
computeHash($uri);
return $this->
buildUrl($url,
$params);
} /**
* Checks that a URI contains the correct hash.
*/
public function check(string
$uri): bool
{ $url =
parse_url($uri);
$params =
[];