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 91
__construct(string $location, int $statusCode = self::FOUND)
Constructor.
at line 104
Redirect
setStatus(int $statusCode)
Sets the HTTP status code.
at line 121
Redirect
movedPermanently()
Sets the HTTP status code to 301.
at line 133
Redirect
found()
Sets the HTTP status code to 302.
at line 145
Redirect
seeOther()
Sets the HTTP status code to 303.
at line 157
Redirect
temporaryRedirect()
Sets the HTTP status code to 307.
at line 169
Redirect
permanentRedirect()
Sets the HTTP status code to 308.
at line 181
int
getStatus()
Returns the HTTP status code.