Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108659 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88358 invoked from network); 18 Feb 2020 15:54:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Feb 2020 15:54:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C4B0E1804AB for ; Tue, 18 Feb 2020 06:10:29 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS12876 195.154.0.0/16 X-Spam-Virus: No X-Envelope-From: Received: from smtp.opensides.be (smtp.fusiondirectory.org [195.154.20.141]) by php-smtp4.php.net (Postfix) with ESMTP for ; Tue, 18 Feb 2020 06:10:28 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by smtp.opensides.be (Postfix) with ESMTP id 911DE49E2D3 for ; Tue, 18 Feb 2020 15:10:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at opensides.be Received: from smtp.opensides.be ([127.0.0.1]) by localhost (smtp.opensides.be [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FW1zBRgZsw1L for ; Tue, 18 Feb 2020 15:10:23 +0100 (CET) Received: from mcmic-probook.opensides.be (63.120.199.77.rev.sfr.net [77.199.120.63]) by smtp.opensides.be (Postfix) with ESMTPSA id 8BF9649E2D2 for ; Tue, 18 Feb 2020 15:10:23 +0100 (CET) To: internals@lists.php.net Date: Tue, 18 Feb 2020 15:10:18 +0100 Message-ID: <4931059.XZjBfs7ihx@mcmic-probook> Organization: FusionDirectory User-Agent: KMail/5.2.3 (Linux/4.9.0-12-amd64; KDE/5.28.0; x86_64; ; ) In-Reply-To: <142F6B38-0524-4311-9350-26AD8D7DE137@pmjones.io> References: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> <2868575.XpRCUmUyJT@mcmic-probook> <142F6B38-0524-4311-9350-26AD8D7DE137@pmjones.io> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Subject: Re: [PHP-DEV] RFC: Server-Side Request and Response Objects (v2) From: come.chilliet@fusiondirectory.org (=?ISO-8859-1?Q?C=F4me?= Chilliet) Le mardi 18 f=E9vrier 2020, 07:33:37 CET Paul M. Jones a =E9crit : > ... the output would be "b\n". As you say, setContent() replaces whatever= content is already in the ServerResponse. While the comparison for a singl= e echo is accurate, the comparison for multiple echoes would be: >=20 > $content =3D "a\n"; > $content .=3D "b\n"; > $response->setContent($content); > $responseSender->send($content); >=20 > Does that help to clarify? Yes, but to me that means we also need an addContent method. Otherwise people will have to carry a global $content along side $response,= or use setContent(getContent().$additionalContent). =2D-=20 C=F4me Chilliet =46usionDirectory - https://www.fusiondirectory.org