PHP 8.6.0 Beta 3 is available for testing

Yaf_Response_Abstract::appendBody

(Yaf >=1.0.0)

Yaf_Response_Abstract::appendBodyAppend to the response body

Descrizione

public function Yaf_Response_Abstract::appendBody(string $body, string $key = ?): Yaf_Response_Abstract|false|null

Append to the response body

Elenco dei parametri

body

The content string.

key

the content key. If not specified, Yaf_Response_Abstract::DEFAULT_BODY will be used.

Valori restituiti

Returns the response object itself on success, or false on failure.

Esempi

Example #1 Yaf_Response_Abstract::appendBody() example

<?php
$response = new Yaf_Response_Http();

$response->setBody("Hello")->appendBody(" World");

echo $response;
?>

Il precedente esempio visualizzerà qualcosa simile a:

Hello World

Vedere anche:

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top