|
Previous Page |
Solar_Http_Response |
Next Page |
setHeader()
public
Solar_Http_Response
setHeader (
string $key,
string $val,
bool $replace default true
)
Sets a header value in $this->_headers; will be sent to the client at display() time.
Parameters
- (string)
$key: The header label, such as "Content-Type". - (string)
$val: The value for the header. - (bool)
$replace: This header value should replace any previous values of the same key. When false, the same header key is sent multiple times with the different values.
Returns
- (Solar_Http_Response) This response object.
Description
Sets a header value in $this->_headers; will be sent to the client at display() time.
This method will not set 'HTTP' headers for response status codes; use the setStatusCode() and setStatusText() methods instead.
See Also
Local
- Overview
- Constants
- Properties
- Methods
- __construct()
- __destruct()
- __toString()
- _exception()
- _sendHeaders()
- apiVersion()
- display()
- dump()
- getContent()
- getCookie()
- getCookies()
- getHeader()
- getHeaders()
- getStatusCode()
- getStatusText()
- getVersion()
- locale()
- setContent()
- setCookie()
- setCookiesHttponly()
- setHeader()
- setStatusCode()
- setStatusText()
- setVersion()