The Yaf_Response_Abstract class
Yaf_Response_Abstract is the base class of the response object, which carries the headers and the content blocks to be sent to the client. It is instantiated by Yaf_Dispatcher; use Yaf_Dispatcher::getResponse to access it, typically inside controllers, actions or plugins.
Intro
Yaf_Response_Abstract is the base class of the response object, which carries the headers and the content blocks to be sent to the client. It is instantiated by Yaf_Dispatcher; use Yaf_Dispatcher::getResponse to access it, typically inside controllers, actions or plugins.
The concrete subclasses are Yaf_Response_Http (used in web SAPIs, which actually sends HTTP headers) and Yaf_Response_Cli (used on the command line).
Class synopsis
Properties
_headerThe HTTP headers set so far, as an array of header name/value pairs. Only meaningful for
Yaf_Response_Http._bodyThe content blocks, keyed by the content key (by default
content, i.e.Yaf_Response_Abstract::DEFAULT_BODY)._sendheaderWhether headers should be sent together with the content. In
Yaf_Response_Httpit also tracks whether the headers have been sent already.
Yaf-response-abstract