‪TYPO3CMS  ‪main
ModifyFileDumpEvent.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\EventDispatcher\StoppableEventInterface;
21 use Psr\Http\Message\ResponseInterface;
22 use Psr\Http\Message\ServerRequestInterface;
24 
34 final class ‪ModifyFileDumpEvent implements StoppableEventInterface
35 {
36  private ?ResponseInterface ‪$response = null;
37 
38  public function ‪__construct(private ‪ResourceInterface $file, private ServerRequestInterface $request) {}
39 
40  public function ‪getFile(): ‪ResourceInterface
41  {
42  return $this->file;
43  }
44 
45  public function ‪setFile(‪ResourceInterface $file): void
46  {
47  $this->file = $file;
48  }
49 
50  public function ‪getRequest(): ServerRequestInterface
51  {
52  return $this->request;
53  }
54 
55  public function ‪setResponse(ResponseInterface ‪$response): void
56  {
57  $this->response = ‪$response;
58  }
59 
60  public function ‪getResponse(): ?ResponseInterface
61  {
62  return ‪$this->response;
63  }
64 
65  public function ‪isPropagationStopped(): bool
66  {
67  return $this->response !== null;
68  }
69 }
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent\isPropagationStopped
‪isPropagationStopped()
Definition: ModifyFileDumpEvent.php:65
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent\getRequest
‪getRequest()
Definition: ModifyFileDumpEvent.php:50
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent
Definition: ModifyFileDumpEvent.php:35
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent\setFile
‪setFile(ResourceInterface $file)
Definition: ModifyFileDumpEvent.php:45
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent\$response
‪ResponseInterface $response
Definition: ModifyFileDumpEvent.php:36
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent\setResponse
‪setResponse(ResponseInterface $response)
Definition: ModifyFileDumpEvent.php:55
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent\__construct
‪__construct(private ResourceInterface $file, private ServerRequestInterface $request)
Definition: ModifyFileDumpEvent.php:38
‪TYPO3\CMS\Core\Resource\Event
Definition: AfterDefaultUploadFolderWasResolvedEvent.php:18
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent\getResponse
‪getResponse()
Definition: ModifyFileDumpEvent.php:60
‪TYPO3\CMS\Core\Resource\ResourceInterface
Definition: ResourceInterface.php:21
‪TYPO3\CMS\Core\Resource\Event\ModifyFileDumpEvent\getFile
‪getFile()
Definition: ModifyFileDumpEvent.php:40