class Redirect implements ResponseSenderInterface

Redirect response.

Properties

protected string $location Location.
protected int $status Status code.

Methods

__construct(string $location, int $status = 302)

Constructor.

setStatus(int $status)

Sets the status code.

multipleChoices()

Sets the status code to 300.

movedPermanently()

Sets the status code to 301.

found()

Sets the status code to 302.

seeOther()

Sets the status code to 303.

notModified()

Sets the status code to 304.

useProxy()

Sets the status code to 305.

temporaryRedirect()

Sets the status code to 307.

permanentRedirect()

Sets the status code to 308.

send(Request $request, Response $response)

Sends the response.

Details

at line 40
__construct(string $location, int $status = 302)

Constructor.

Parameters

string $location Location
int $status Status code

at line 53
Redirect setStatus(int $status)

Sets the status code.

Parameters

int $status Status code

Return Value

Redirect

at line 65
Redirect multipleChoices()

Sets the status code to 300.

Return Value

Redirect

at line 77
Redirect movedPermanently()

Sets the status code to 301.

Return Value

Redirect

at line 89
Redirect found()

Sets the status code to 302.

Return Value

Redirect

at line 101
Redirect seeOther()

Sets the status code to 303.

Return Value

Redirect

at line 113
Redirect notModified()

Sets the status code to 304.

Return Value

Redirect

at line 125
Redirect useProxy()

Sets the status code to 305.

Return Value

Redirect

at line 137
Redirect temporaryRedirect()

Sets the status code to 307.

Return Value

Redirect

at line 149
Redirect permanentRedirect()

Sets the status code to 308.

Return Value

Redirect

at line 159
send(Request $request, Response $response)

Sends the response.

Parameters

Request $request Request instance
Response $response Response instance