src/AbstractResponse.php
public function redirect(string $url): void {
		if (!filter_var($url, FILTER_VALIDATE_URL)) {
			throw new ResponseException("Invalid URL: $url", ResponseException::INVALID_URL);
		}
		
		$this->setType("redirect");
		$this->data["url"] = $url;
	}
public function redirect(string $url): void {
		if (!filter_var($url, FILTER_VALIDATE_URL)) {
			throw new ResponseException("Invalid URL: $url", ResponseException::INVALID_URL);
		}
		
		$this->setType("redirect");
		$this->data["url"] = $url;
	}
public function redirect ( string $ url ) : void { if ( ! filter_var ( $ url , FILTER_VALIDATE_URL ) ) { throw new ResponseException ( "Invalid URL: $url" , ResponseException :: INVALID_URL ) ; } $ this -> setType ( "redirect" ) ; $ this -> data [ "url" ] = $ url ; }
sets the appropriate type and data for a redirection

@param string $url

@throws ResponseException
sets the appropriate type and data for a redirection