__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)
stringThe response body
intThe response status
array
__toString() : string
stringbody(string | bool $value) : \Fuel\Core\Response | string
forge(string $body, int $status, array $headers) : \Fuel\Core\Response
stringThe response body
intThe HTTP response status for this response
arrayArray of HTTP headers for this response
get_header(string $name) : mixed
stringThe header name, or null for all headers
mixedredirect(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.
stringThe url
stringThe redirect method
intThe 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
stringThe url
stringThe redirect method
intThe redirect status code
\RuntimeException | 
If it would redirect back to itself | 
|---|
send(bool $send_headers) : void
Optionally will send the headers.
boolWhether or not to send the defined HTTP headers
send_headers() : bool
Returns whether they were sent or not.
boolset_header(string $name, string $value, string | bool $replace) : \Fuel\Core\Response
stringThe header name
stringThe header value
stringboolWhether to replace existing value for the header, will never overwrite/be overwritten when false
set_headers(array $headers, string | bool $replace) : \Fuel\Core\Response
arrayAssoc array with header name / value combinations
stringboolWhether to replace existing value for the header, will never overwrite/be overwritten when false
$body : string
$headers : array
$status : int
$statuses : array