Implements: Kohana_HTTP_Response | Kohana_HTTP_Message | HTTP_Message
A HTTP Reponse specific interface that adds the methods required by HTTP responses. Over and above Kohana_HTTP_Interaction, this interface provides status.
Class declared in SYSPATH/classes/http/response.php on line 3.
Gets or sets the HTTP body to the request or response. The body is included after the header, separated by a single empty new line.
string
$content
= NULL - Content to set to the objectstring
void
public
function
body(
$content
= NULL);
Sets or gets the HTTP status from this response.
// Set the HTTP status to 404 Not Found
$response
= Response::factory()
->status(404);
// Get the current status
$status
=
$response
->status();
integer
$code
= NULL - Status to set to this responsemixed
public
function
status(
$code
= NULL);
Gets or sets HTTP headers to the request or response. All headers are included immediately after the HTTP protocol definition during transmission. This method provides a simple array or key/value interface to the headers.
mixed
$key
= NULL - Key or array of key/value pairs to setstring
$value
= NULL - Value to set to the supplied keymixed
public
function
headers(
$key
= NULL,
$value
= NULL);
Gets or sets the HTTP protocol. The standard protocol to use
is HTTP/1.1
.
string
$protocol
= NULL - Protocol to set to the request/responsemixed
public
function
protocol(
$protocol
= NULL);
Renders the HTTP_Interaction to a string, producing
string
public
function
render();