__construct()
__toString()
body()
forge()
get_header()
redirect()
redirect_back()
send()
send_headers()
set_header()
set_headers()
set_status()
$body
$headers
$status
$statuses
__construct(string $body, int $status, array $headers)
string
The response body
int
The response status
array
__toString() : string
string
body(string | bool $value) : \Fuel\Core\Response | string
forge(string $body, int $status, array $headers) : \Fuel\Core\Response
string
The response body
int
The HTTP response status for this response
array
Array of HTTP headers for this response
get_header(string $name) : mixed
string
The header name, or null for all headers
mixed
redirect(string $url, string $method, int $code) : void
Sets the redirect header, sends the headers and exits. Can redirect via a Location header or using a refresh header.
The refresh header works better on certain servers like IIS.
string
The url
string
The redirect method
int
The redirect status code
redirect_back(string $url, string $method, int $code) : void
If not, it will redirect to the given url, and if none is given, back to the application root. If the current page is the application root, an exception is thrown
string
The url
string
The redirect method
int
The redirect status code
\RuntimeException |
If it would redirect back to itself |
---|
send(bool $send_headers) : void
Optionally will send the headers.
bool
Whether or not to send the defined HTTP headers
send_headers() : bool
Returns whether they were sent or not.
bool
set_header(string $name, string $value, string | bool $replace) : \Fuel\Core\Response
string
The header name
string
The header value
string
bool
Whether to replace existing value for the header, will never overwrite/be overwritten when false
set_headers(array $headers, string | bool $replace) : \Fuel\Core\Response
array
Assoc array with header name / value combinations
string
bool
Whether to replace existing value for the header, will never overwrite/be overwritten when false
$body : string
$headers : array
$status : int
$statuses : array