class Redirect implements ResponseSenderInterface

Redirect response.

Properties

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

Methods

__construct(string $location)

Constructor.

status(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 39
__construct(string $location)

Constructor.

Parameters

string $location Location

at line 50
Redirect status(int $status)

Sets the status code.

Parameters

int $status Status code

Return Value

Redirect

at line 62
Redirect multipleChoices()

Sets the status code to 300.

Return Value

Redirect

at line 74
Redirect movedPermanently()

Sets the status code to 301.

Return Value

Redirect

at line 86
Redirect found()

Sets the status code to 302.

Return Value

Redirect

at line 98
Redirect seeOther()

Sets the status code to 303.

Return Value

Redirect

at line 110
Redirect notModified()

Sets the status code to 304.

Return Value

Redirect

at line 122
Redirect useProxy()

Sets the status code to 305.

Return Value

Redirect

at line 134
Redirect temporaryRedirect()

Sets the status code to 307.

Return Value

Redirect

at line 146
Redirect permanentRedirect()

Sets the status code to 308.

Return Value

Redirect

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

Sends the response.

Parameters

Request $request Request instance
Response $response Response instance