Zend Framework
3.0
|
Public Member Functions | |
send () | |
Send the response, including all headers. | |
sendHeaders () | |
Send all headers. | |
setHeader ($name, $value, $replace=false) | |
Set a header. | |
getHeader ($name) | |
Check if a specific Header is set and return its value. | |
getHeaders () | |
Return array of headers; see $headers for format. | |
canSendHeaders ($throw=false) | |
Can we send headers? | |
setStatusCode ($code) | |
Set HTTP response code to use with headers. | |
getStatusCode () | |
Retrieve HTTP response code. | |
setContent ($content) | |
Set body content. | |
getContent () | |
Return the body content. | |
Protected Member Functions | |
_normalizeHeader ($name) | |
Normalizes a header name to X-Capitalized-Names. | |
Protected Attributes | |
$content = '' | |
$headers = [] | |
$statusCode = 200 | |
|
protected |
Normalizes a header name to X-Capitalized-Names.
string | $name |
canSendHeaders | ( | $throw = false | ) |
Can we send headers?
bool | $throw | Whether or not to throw an exception if headers have been sent; defaults to false |
Exception\RuntimeException |
getContent | ( | ) |
Return the body content.
getHeader | ( | $name | ) |
Check if a specific Header is set and return its value.
string | $name |
getHeaders | ( | ) |
Return array of headers; see $headers for format.
getStatusCode | ( | ) |
Retrieve HTTP response code.
send | ( | ) |
Send the response, including all headers.
sendHeaders | ( | ) |
Send all headers.
Sends any headers specified. If an HTTP response code has been specified, it is sent with the first header.
setContent | ( | $content | ) |
Set body content.
string | $content |
setHeader | ( | $name, | |
$value, | |||
$replace = false |
|||
) |
Set a header.
If $replace is true, replaces any headers already defined with that $name.
string | $name | |
string | $value | |
bool | $replace |
setStatusCode | ( | $code | ) |
Set HTTP response code to use with headers.
int | $code |
Exception\InvalidArgumentException |
|
protected |
|
protected |
|
protected |