public TrustedRedirectResponse::__construct($url, $status = 302, $headers = array())
Creates a redirect response so that it conforms to the rules defined for a redirect status code.
string $url The URL to redirect to. The URL should be a full URL, with schema etc.,: but practically every browser redirects on paths only as well
int $status The status code (302 by default):
array $headers The headers (Location is always set to the given URL):
\InvalidArgumentException
Overrides RedirectResponse::__construct
http://tools.ietf.org/html/rfc2616#section-10.3
public function __construct($url, $status = 302, $headers = array()) {
$this->trustedUrls[$url] = TRUE;
parent::__construct($url, $status, $headers);
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!TrustedRedirectResponse.php/function/TrustedRedirectResponse::__construct/8.1.x