Свойство | Type | Description | |
---|---|---|---|
$expiresParameter | string | The URL's query parameter name for the expiration. | |
$signatureKey | string | The key that is used to generate secure signatures. | |
$signatureParameter | string | The URL's query parameter name for the signature. |
Méthode | Description | |
---|---|---|
__construct ( string $signatureKey, string $expiresParameter = 'expires', string $signatureParameter = 'signature' ) | ||
sign ( string $url, DateTime | integer $expiration ) : string | Get a secure URL to a controller action. | |
validate ( string $url ) : boolean | Validate a signed url. |
Méthode | Description | |
---|---|---|
getExpirationTimestamp ( DateTime | integer $expiration ) : string | Retrieve the expiration timestamp for a link based on an absolute DateTime or a relative number of days. | |
getIntendedUrl ( League\Url\UrlImmutable $url ) : League\Url\UrlImmutable | Retrieve the intended URL by stripping off the UrlSigner specific parameters. | |
hasValidSignature ( League\Url\UrlImmutable $url ) : boolean | Determine if the url has a forged signature. | |
isFuture ( integer $timestamp ) : boolean | Check if an a timestamp is in the past. | |
isMissingAQueryParameter ( League\Url\Components\QueryInterface $query ) : boolean | Check if a query is missing a necessary parameter. | |
signUrl ( League\Url\UrlImmutable $url, string $expiration, string $signature ) : League\Url\UrlImmutable | Add expiration and signature query parameters to an url. |
protected getExpirationTimestamp ( DateTime | integer $expiration ) : string | ||
$expiration | DateTime | integer | The expiration date of this link. - DateTime: The value will be used as expiration date - int: The expiration time will be set to X days from now |
Résultat | string |
protected getIntendedUrl ( League\Url\UrlImmutable $url ) : League\Url\UrlImmutable | ||
$url | League\Url\UrlImmutable | |
Résultat | League\Url\UrlImmutable |
protected hasValidSignature ( League\Url\UrlImmutable $url ) : boolean | ||
$url | League\Url\UrlImmutable | |
Résultat | boolean |
protected isMissingAQueryParameter ( League\Url\Components\QueryInterface $query ) : boolean | ||
$query | League\Url\Components\QueryInterface | |
Résultat | boolean |
protected string $expiresParameter | ||
Résultat | string |
protected string $signatureKey | ||
Résultat | string |
protected string $signatureParameter | ||
Résultat | string |