‪TYPO3CMS  ‪main
RedirectWasHitEvent.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\Http\Message\ResponseInterface;
21 use Psr\Http\Message\ServerRequestInterface;
22 use Psr\Http\Message\UriInterface;
23 
33 {
34  public function ‪__construct(
35  private readonly ServerRequestInterface $request,
36  private ResponseInterface $response,
37  private array ‪$matchedRedirect,
38  private readonly UriInterface ‪$targetUrl
39  ) {}
40 
41  public function ‪getRequest(): ServerRequestInterface
42  {
43  return $this->request;
44  }
45 
46  public function ‪getTargetUrl(): UriInterface
47  {
48  return ‪$this->targetUrl;
49  }
50 
51  public function ‪setMatchedRedirect(array ‪$matchedRedirect): void
52  {
53  $this->matchedRedirect = ‪$matchedRedirect;
54  }
55 
56  public function ‪getMatchedRedirect(): array
57  {
59  }
60 
61  public function ‪setResponse(ResponseInterface $response): void
62  {
63  $this->response = $response;
64  }
65 
66  public function ‪getResponse(): ResponseInterface
67  {
68  return $this->response;
69  }
70 }
‪TYPO3\CMS\Redirects\Event\RedirectWasHitEvent\getTargetUrl
‪getTargetUrl()
Definition: RedirectWasHitEvent.php:46
‪TYPO3\CMS\Redirects\Message\$targetUrl
‪identifier readonly UriInterface $targetUrl
Definition: RedirectWasHitMessage.php:33
‪TYPO3\CMS\Redirects\Event\RedirectWasHitEvent\getMatchedRedirect
‪getMatchedRedirect()
Definition: RedirectWasHitEvent.php:56
‪TYPO3\CMS\Redirects\Event\RedirectWasHitEvent\setResponse
‪setResponse(ResponseInterface $response)
Definition: RedirectWasHitEvent.php:61
‪TYPO3\CMS\Redirects\Event\RedirectWasHitEvent\getResponse
‪getResponse()
Definition: RedirectWasHitEvent.php:66
‪TYPO3\CMS\Redirects\Event\RedirectWasHitEvent\__construct
‪__construct(private readonly ServerRequestInterface $request, private ResponseInterface $response, private array $matchedRedirect, private readonly UriInterface $targetUrl)
Definition: RedirectWasHitEvent.php:34
‪TYPO3\CMS\Redirects\Event
Definition: AfterAutoCreateRedirectHasBeenPersistedEvent.php:18
‪TYPO3\CMS\Redirects\Event\RedirectWasHitEvent\setMatchedRedirect
‪setMatchedRedirect(array $matchedRedirect)
Definition: RedirectWasHitEvent.php:51
‪TYPO3\CMS\Redirects\Event\RedirectWasHitEvent\getRequest
‪getRequest()
Definition: RedirectWasHitEvent.php:41
‪TYPO3\CMS\Redirects\Message\$matchedRedirect
‪identifier readonly UriInterface readonly int readonly array $matchedRedirect
Definition: RedirectWasHitMessage.php:35
‪TYPO3\CMS\Redirects\Event\RedirectWasHitEvent
Definition: RedirectWasHitEvent.php:33