Redirect
class Redirect implements ResponseSenderInterface
Redirect response.
Constants
MOVED_PERMANENTLY |
Moved permanently status code. |
FOUND |
Found status code. |
SEE_OTHER |
See other status code. |
TEMPORARY_REDIRECT |
Temporary redirect status code. |
PERMANENT_REDIRECT |
Permanent redirect status code. |
SUPPORTED_STATUS_CODES |
Supported redirect types. |
Properties
protected string | $location | Location. | |
protected int | $statusCode | Status code. |
Methods
__construct(string $location, int $statusCode = self::FOUND)
Constructor.
movedPermanently()
Sets the HTTP status code to 301.
temporaryRedirect()
Sets the HTTP status code to 307.
permanentRedirect()
Sets the HTTP status code to 308.
int
getStatus()
Returns the HTTP status code.
Details
at line 93
__construct(string $location, int $statusCode = self::FOUND)
Constructor.
at line 106
Redirect
setStatus(int $statusCode)
Sets the HTTP status code.
at line 123
Redirect
movedPermanently()
Sets the HTTP status code to 301.
at line 135
Redirect
found()
Sets the HTTP status code to 302.
at line 147
Redirect
seeOther()
Sets the HTTP status code to 303.
at line 159
Redirect
temporaryRedirect()
Sets the HTTP status code to 307.
at line 171
Redirect
permanentRedirect()
Sets the HTTP status code to 308.
at line 183
int
getStatus()
Returns the HTTP status code.