Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:108652 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 39990 invoked from network); 18 Feb 2020 11:09:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Feb 2020 11:09:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1F0B018050A for ; Tue, 18 Feb 2020 01:24:59 -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.opensides.be [195.154.20.141]) by php-smtp4.php.net (Postfix) with ESMTP for ; Tue, 18 Feb 2020 01:24:58 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by smtp.opensides.be (Postfix) with ESMTP id 87FE749E208 for ; Tue, 18 Feb 2020 10:24:56 +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 xlGs2fr-jR2C for ; Tue, 18 Feb 2020 10:24:53 +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 42C2249E203 for ; Tue, 18 Feb 2020 10:24:53 +0100 (CET) To: internals@lists.php.net Date: Tue, 18 Feb 2020 10:24:52 +0100 Message-ID: <2868575.XpRCUmUyJT@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: <3E805205-A559-44D7-98FA-960E92FE5E6E@pmjones.io> References: <50BD013E-CF72-414C-BBC0-A7A2E45CBDDB@pmjones.io> <3E805205-A559-44D7-98FA-960E92FE5E6E@pmjones.io> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 jeudi 13 f=C3=A9vrier 2020, 09:16:49 CET Paul M. Jones a =C3=A9crit : > Yeah, naming is one of the hard problems. I considered $query as an alter= native property name for $get, but in the end, the `$_GET =3D> $get` symmet= ry was too great to ignore. If others here feel that $query is a better nam= e for `$_GET` than $get, I will submit to consensus on that point. query is definitely better than get. Regarding post, I=E2=80=99m fine with body, parsedBody and input. I get the idea of input to mimic php://input, but if I understand things co= rrectly, php://input is raw body, while $request->post is parsed body, so n= aming them alike might actually cause confusion? > > Given 'echo $content; =3D> $response->setContent($content);', shouldn't > > this rather be something like `addContent()`? >=20 > That looks like poor describing on my part in the RFC. It is more true to= say that these are equivalent: >=20 > echo $content; > =20 > // =3D> > =20 > $response->setContent($content); > $responseSender->send($response); >=20 > I will try to make that more apparent in the RFC. I still do not understand this. echo adds content to the response, it does not replace it. So the equivalent function should be $response->addContent. I would expect $response->setContent to replace the content. Can you explicit behavior for this: $response->setContent("a\n"); $response->setContent("b\n"); $responseSender->send($response); Compared to echo "a\n"; echo "b\n"; =2D-=20 C=C3=B4me Chilliet =46usionDirectory - https://www.fusiondirectory.org