php8.5
Home/ Manual/ yaf / yaf_response_abstract/ Yaf_Response_Abstract::response

Yaf_Response_Abstract::response

PHP function Edit on GitHub ✎

(Yaf >=1.0.0)

Send the response

Description

Yaf_Response_Abstract::response(): bool|null

Send the response: the headers and all body blocks, in order.

Parameters Parameters

Return Values

Returns true on success, or null on failure.

Examples

Yaf_Response_Abstract::response() example

php
<?php
$response = new Yaf_Response_Http();

$response->setBody("Hello")->setBody(" World", "footer");

$response->response();
?>

The above example will output something similar to:

output
Hello World

See Also

  • Yaf_Response_Abstract::setBody
  • Yaf_Response_Abstract::clearBody

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