‪TYPO3CMS  11.5
StopActionException.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;
23 
37 {
41  private ‪$response;
42 
43  public function ‪__construct($message = '', $code = 0, \Throwable $previous = null, ResponseInterface ‪$response = null)
44  {
45  // @deprecated since v11, will be removed in v12. Can not trigger_error() here since
46  // extbase ActionController still has to use this exception for b/w compatibility.
47  // See the usages of this exception when dropping in v12.
48  $this->response = ‪$response ?? new ‪Response();
49  parent::__construct($message, $code, $previous);
50  }
51 
52  public function ‪getResponse(): ResponseInterface
53  {
54  return ‪$this->response;
55  }
56 }
‪TYPO3\CMS\Extbase\Mvc\Exception
Definition: Exception.php:25
‪TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
Definition: StopActionException.php:37
‪TYPO3\CMS\Extbase\Mvc\Exception\StopActionException\__construct
‪__construct($message='', $code=0, \Throwable $previous=null, ResponseInterface $response=null)
Definition: StopActionException.php:42
‪TYPO3\CMS\Core\Http\Response
Definition: Response.php:30
‪TYPO3\CMS\Extbase\Mvc\Exception
Definition: InfiniteLoopException.php:18
‪TYPO3\CMS\Extbase\Mvc\Exception\StopActionException\getResponse
‪getResponse()
Definition: StopActionException.php:51
‪TYPO3\CMS\Extbase\Mvc\Exception\StopActionException\$response
‪ResponseInterface $response
Definition: StopActionException.php:40