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

From: Date: Sat, 14 Mar 2020 15:18:53 +0000
Subject: Re: RFC: Server-Side Request and Response Objects (v2)
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-109013@lists.php.net to get a copy of this message
On 13/03/2020 20:36, Larry Garfield wrote:
* The RFC by design is trying to take the super-globals and make them OOPy; no more, no less. * The super-globals are not based on HTTP. They're based on CGI, which is sort of but not quite an HTTP request. * So... call it CgiRequest/CGIRequest? (I am also ignoring capitalization.) Because that's what it is: It's CGI request data wrapped up into an object, no more, no less.
This makes a lot of sense to me. I also just realised that it would make sense to rename $_SERVER in the object, the same way $_GET has become "query" and $_POST has become "input". Maybe $request->cgi or something? CGIRequest->cgi might feel awkward, but it's no worse than the current ServerRequest->server, and I think naming it that way gives a better hint as to why the array has such an odd collection of things in it. Regards, -- Rowan Tommins (né Collins) [IMSoP]

« previous php.internals (#109013) next »