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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to