‪TYPO3CMS  9.5
RedirectResponse.php
Go to the documentation of this file.
1 <?php
2 namespace ‪TYPO3\CMS\Core\Http;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
17 use Psr\Http\Message\UriInterface;
18 
27 {
36  public function ‪__construct($uri, $status = 302, array ‪$headers = [])
37  {
38  if (!is_string($uri) && !($uri instanceof UriInterface)) {
39  throw new \InvalidArgumentException(
40  'The given uri be a string or UriInterface - '
41  . (is_object($uri) ? get_class($uri) : gettype($uri)) . ' given',
42  1504814459
43  );
44  }
45  ‪$headers['location'] = [(string)$uri];
46  parent::__construct('php://temp', $status, ‪$headers);
47  }
48 }
‪TYPO3\CMS\Core\Http\RedirectResponse\__construct
‪__construct($uri, $status=302, array $headers=[])
Definition: RedirectResponse.php:36
‪TYPO3\CMS\Core\Http\Response
Definition: Response.php:28
‪TYPO3\CMS\Core\Http\RedirectResponse
Definition: RedirectResponse.php:27
‪TYPO3\CMS\Core\Http\Message\$headers
‪array $headers
Definition: Message.php:39
‪TYPO3\CMS\Core\Http
Definition: AbstractApplication.php:3