abstract class SecuredRedirectResponse

Provides a common base class for safe redirects.

In case you want to redirect to external URLs use TrustedRedirectResponse.

For local URLs we use LocalRedirectResponse which opts out of external redirects.

Hierarchy

File

core/lib/Drupal/Component/HttpFoundation/SecuredRedirectResponse.php, line 16

Namespace

Drupal\Component\HttpFoundation

Members

Name Modifiers Type Description
RedirectResponse::$targetUrl protected property
RedirectResponse::create public static function
RedirectResponse::getTargetUrl public function Returns the target URL.
RedirectResponse::__construct public function Creates a redirect response so that it conforms to the rules defined for a redirect status code.
SecuredRedirectResponse::createFromRedirectResponse public static function Copies an existing redirect response into a safe one.
SecuredRedirectResponse::fromResponse protected function Copies over the values from the given response.
SecuredRedirectResponse::isSafe abstract protected function Returns whether the URL is considered as safe to redirect to.
SecuredRedirectResponse::setTargetUrl public function Sets the redirect target of this response. Overrides RedirectResponse::setTargetUrl

© 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!Component!HttpFoundation!SecuredRedirectResponse.php/class/SecuredRedirectResponse/8.1.x