Re: RFC: Server-Side Request and Response Objects (v2)

From: Date: Thu, 13 Feb 2020 10:52:45 +0000
Subject: Re: RFC: Server-Side Request and Response Objects (v2)
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-108534@lists.php.net to get a copy of this message
Le mercredi 12 février 2020, 19:20:56 CET Niklas Keller a écrit : > Naming > > I think we shouldn't take over the naming of the super globals, e.g. > $_GET really contains the query parameters and has nothing to do with > GET or POST, so $request->getQueryParameter(...) would be a better > name. I think this remark is really on point. GET and POST are HTTP methods and not ways of passing data. You can have query parameters on any request, and you can have POST data with a lot of other HTTP methods, as is commonly used in REST APIs. I do not like the name getQueryParameter at first sight, but I do not like get() and post() for getting values from $_GET and $_POST. I would expect a method named post to actually post something, not just get a value. -- Côme Chilliet FusionDirectory - https://www.fusiondirectory.org

« previous php.internals (#108534) next »