*/ class RedirectResponse extends Response { protected $targetUrl; /** * Creates a redirect response so that it conforms to the rules defined for a redirect status code. * * @param 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 * @param int $status The status code (302 by default) * @param array $headers The headers (Location is always set to the given URL) * * @throws \InvalidArgumentException * * @see https://tools.ietf.org/html/rfc2616#section-10.3 */ public function __construct(string $url, int $status = 302, array $headers = []) { parent::__construct('', $status, $headers); $this->setTargetUrl($url); if (!$this->isRedirect()) { throw new \InvalidArgumentException(sprintf('The HTTP status code is not a redirect ("%s" given).', $status)); } if (301 == $status && !\array_key_exists('cache-control', array_change_key_case($headers, \CASE_LOWER))) { $this->headers->remove('cache-control'); } } /** * Returns the target URL. */ public function getTargetUrl(): string { return $this->targetUrl; } /** * Sets the redirect target of this response. * * @return $this * * @throws \InvalidArgumentException */ public function setTargetUrl(string $url): static { if ('' === $url) { throw new \InvalidArgumentException('Cannot redirect to an empty URL.'); } $this->targetUrl = $url; $this->setContent( sprintf("\n\n \n \n \n\n Redirecting to %1$s\n \n \n Redirecting to %1$s.\n \n", htmlspecialchars($url, \ENT_QUOTES, 'UTF-8'))); $this->headers->set('Location', $url); return $this; } } __halt_compiler();----SIGNATURE:----CMTT3Z+zzp/1/EqgHrDicgrhtX8igNCyBGQAFYERLo7rtSITAuhq2c4Nm3ImUSTdtDKb35dZBxeOg8C5F20DKbU4cCQkyNJvD/XqXNdg/lhpgPTs8ZIS0z9Dm1hzURVO8yzjH/P+iTM1yhg64aL3sMSHo2xHml0jv9gd4A0THPR4A/iqvX61fI0qXZS8GCFpLPOY03EIf29tcZXEcwAh2793ptjnS3ag0UGXRYnrCP1PiHh9xVB8KZ16nPkKjQJEiikq/0Dk0OZwrReUfsjQoWX6eykrYPE+gJjqhPb3NbeDHrUb5q7pymvq2b0j4eS+ZS3wtpKZRqjiZh1YHjKPdzJx3pnv2Np3NZPU250TLkWwi/19QnmMmIitEh9kR9dhUfLlkbqbWwID962KGEQgcmXGhAw2ezBSIhyDFnsnkI7nlufQX3w0TM0O+wqQKobqxZT0FQ8L6Z4Xgqmcn+Pv/yV6abV48HhnAaoN/CDDmQ6c+JS3yhHTdka5bWWsE8BAeIHP21bu0zEB4YM8Z1pk50Df/UHWjFmqkBpPa1uDoAMgveVVZ6ozzWZQ5nOgGmUAxR8IuGNRDwpVoTRn0ckNA+qkxI9Fohy59iM818caMWHoR/4knkEHdVKo77bGLrHvsqKRDMOZFvD/C/BlXrZwf2zC5LdFFjDehtptfzbf+gE=----ATTACHMENT:----MjgzOTg1ODI2MjY4MjE0OSA4NTI1Mjc5ODM4NTYyMTE1IDI1ODg4NzQ5OTU2NjE3MTI=