Yaf_Response_Abstract::appendBody
PHP function
Edit on GitHub ✎
(Yaf >=1.0.0)
Append to the response body
Description
Yaf_Response_Abstract::appendBody(string $body, [string $key]): Yaf_Response_Abstract|false|null
Append to the response body
Parameters
bodyThe content string.
keythe content key. If not specified,
Yaf_Response_Abstract::DEFAULT_BODYwill be used.
Return Values
Returns the response object itself on success, or false on failure.
Examples
Yaf_Response_Abstract::appendBody() example
php
<?php
$response = new Yaf_Response_Http();
$response->setBody("Hello")->appendBody(" World");
echo $response;
?>The above example will output something similar to:
output
Hello WorldSee Also
Yaf_Response_Abstract::getBodyYaf_Response_Abstract::setBodyYaf_Response_Abstract::prependBodyYaf_Response_Abstract::clearBody