UriSigner
class UriSigner
Signs URIs.
Methods
__construct(string $secret) | ||
string | sign(string $uri) Signs a URI. | |
bool | check(string $uri) Checks that a URI contains the correct hash. |
Details
__construct(string $secret)
Parameters
string | $secret | A secret |
string sign(string $uri)
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 |
bool check(string $uri)
Checks that a URI contains the correct hash.
Parameters
string | $uri | A signed URI |
Return Value
bool | True if the URI is signed correctly, false otherwise |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/2.8/Symfony/Component/HttpKernel/UriSigner.html