public function UriSigner::sign

Signs a URI.

The given URI is signed by adding a _hash query string parameter which value depends on the URI and the secret.

Parameters

string $uri A URI to sign:

Return value

string The signed URI

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/UriSigner.php, line 43

Class

UriSigner
Signs URIs.

Namespace

Symfony\Component\HttpKernel

Code

public function sign($uri) {
  return $uri . (false === strpos($uri, '?') ? '?' : '&') . '_hash=' . $this
    ->computeHash($uri);
}