Zend_Controller_Response_Abstract
Base class for Zend_Controller responses
package | Zend_Controller |
---|---|
subpackage | Response |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__toString() : string
Proxies to \sendResponse() and returns response value as string using output buffering.
string
append(string $name, string $content) : \Zend_Controller_Response_Abstract
If segment already exists, replaces with $content and places at end of array.
string
string
\Zend_Controller_Response_Abstract
appendBody(string $content, null|string $name = null
) : \Zend_Controller_Response_Abstract
string
null
string
\Zend_Controller_Response_Abstract
canSendHeaders(boolean $throw = false
) : boolean
boolean
Whether or not to throw an exception if headers have been sent; defaults to false
\Zend_Controller_Response_Exception |
---|
boolean
clearAllHeaders() : \Zend_Controller_Response_Abstract
\Zend_Controller_Response_Abstract
clearBody(string $name = null
) : boolean
With no arguments, clears the entire body array. Given a $name, clears just that named segment; if no segment matching $name exists, returns false to indicate an error.
string
Named segment to clear
boolean
clearHeader(string $name) : \Zend_Controller_Response_Abstract
string
\Zend_Controller_Response_Abstract
clearHeaders() : \Zend_Controller_Response_Abstract
\Zend_Controller_Response_Abstract
clearRawHeader(string $headerRaw) : \Zend_Controller_Response_Abstract
string
\Zend_Controller_Response_Abstract
clearRawHeaders() : \Zend_Controller_Response_Abstract
\Zend_Controller_Response_Abstract
getBody(boolean $spec = false
) : string | array | null
If $spec is false, returns the concatenated values of the body content array. If $spec is boolean true, returns the body content array. If $spec is a string and matches a named segment, returns the contents of that segment; otherwise, returns null.
boolean
string
array
null
getException() : array
array
getExceptionByCode(mixed $code) : void
mixed
getExceptionByMessage(string $message) : false | array
string
false
array
getExceptionByType(string $type) : false | array
string
false
array
getHeaders() : array
array
getHttpResponseCode() : integer
integer
getRawHeaders() : array
array
hasExceptionOfCode(integer $code) : boolean
integer
boolean
hasExceptionOfMessage(string $message) : boolean
string
boolean
hasExceptionOfType(string $type) : boolean
string
boolean
insert(string $name, string $content, string $parent= null
, boolean $before= false
) : \Zend_Controller_Response_Abstract
string
string
string
boolean
Whether to insert the new segment before or after the parent. Defaults to false (after)
\Zend_Controller_Response_Abstract
isException() : boolean
boolean
isRedirect() : boolean
boolean
outputBody() : void
prepend(string $name, string $content) : void
If segment already exists, replaces with $content and places at top of array.
string
string
renderExceptions(boolean $flag = null
) : boolean
If called with no arguments or a null argument, returns the value of the flag; otherwise, sets it and returns the current value.
boolean
Optional
boolean
sendHeaders() : \Zend_Controller_Response_Abstract
Sends any headers specified. If an \setHttpResponseCode() has been specified, it is sent with the first header.
\Zend_Controller_Response_Abstract
sendResponse() : void
setBody(string $content, null|string $name = null
) : \Zend_Controller_Response_Abstract
If $name is not passed, or is not a string, resets the entire body and sets the 'default' key to $content.
If $name is a string, sets the named segment in the body array to $content.
string
null
string
\Zend_Controller_Response_Abstract
setException(\Exception $e) : \Zend_Controller_Response_Abstract
\Exception
\Zend_Controller_Response_Abstract
setHeader(string $name, string $value, boolean $replace = false
) : \Zend_Controller_Response_Abstract
If $replace is true, replaces any headers already defined with that $name.
string
string
boolean
\Zend_Controller_Response_Abstract
setHttpResponseCode(integer $code) : \Zend_Controller_Response_Abstract
integer
\Zend_Controller_Response_Abstract
setRawHeader(string $value) : \Zend_Controller_Response_Abstract
Allows setting non key => value headers, such as status codes
string
\Zend_Controller_Response_Abstract
setRedirect(string $url, integer $code = 302
) : \Zend_Controller_Response_Abstract
Sets Location header and response code. Forces replacement of any prior redirects.
string
integer
\Zend_Controller_Response_Abstract
_normalizeHeader(string $name) : string
Normalizes a header name to X-Capitalized-Names
string
string
$headersSentThrowsException : boolean
true
$_body : array
array()
$_exceptions : \Exception
array()
$_headers : array
array()
$_headersRaw : array
array()
$_httpResponseCode : integer
200
$_isRedirect : boolean
false
$_renderExceptions : boolean
false