RedirectWasHitEvent
FinalYes
This event is fired in the \TYPO3\CMS\Redirects\Http\Middleware\RedirectHandler middleware when a request matches a configured redirect.
It can be used to further process the matched redirect and to adjust the PSR-7 Response. It furthermore allows to influence Core functionality, for example the hit count increment.
Table of Contents
Methods
- __construct() : mixed
- getMatchedRedirect() : array<string|int, mixed>
- getRequest() : ServerRequestInterface
- getResponse() : ResponseInterface
- getTargetUrl() : UriInterface
- setMatchedRedirect() : void
- setResponse() : void
Methods
__construct()
public
__construct(ServerRequestInterface $request, ResponseInterface $response, array<string|int, mixed> $matchedRedirect, UriInterface $targetUrl) : mixed
Parameters
- $request : ServerRequestInterface
- $response : ResponseInterface
- $matchedRedirect : array<string|int, mixed>
- $targetUrl : UriInterface
getMatchedRedirect()
public
getMatchedRedirect() : array<string|int, mixed>
Return values
array<string|int, mixed>getRequest()
public
getRequest() : ServerRequestInterface
Return values
ServerRequestInterfacegetResponse()
public
getResponse() : ResponseInterface
Return values
ResponseInterfacegetTargetUrl()
public
getTargetUrl() : UriInterface
Return values
UriInterfacesetMatchedRedirect()
public
setMatchedRedirect(array<string|int, mixed> $matchedRedirect) : void
Parameters
- $matchedRedirect : array<string|int, mixed>
setResponse()
public
setResponse(ResponseInterface $response) : void
Parameters
- $response : ResponseInterface