php8.5
Home/ Manual/ reference / yaf/ The Yaf_Response_Abstract class

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

class Yaf_Response_Abstract { }

Properties

_header

The HTTP headers set so far, as an array of header name/value pairs. Only meaningful for Yaf_Response_Http.

_body

The content blocks, keyed by the content key (by default content, i.e. Yaf_Response_Abstract::DEFAULT_BODY).

_sendheader

Whether headers should be sent together with the content. In Yaf_Response_Http it also tracks whether the headers have been sent already.

Yaf-response-abstract

Source: reference/yaf/yaf-response-abstract.xml · from the official PHP manual (php/doc-en)