Sherif Ramadan wrote on 31/10/2014 16:07:
On Fri, Oct 31, 2014 at 11:56 AM, Rowan Collins
<rowan.coll...@gmail.com <mailto:rowan.coll...@gmail.com>> wrote:
I think the piece that's missing is how exactly these interfaces
would interact with core, or rather with the SAPIs which handle
the actual transfer of HTTP requests and responses.
PHP would have an HttpRequest class, as noted in the updated RFC,
which implements the HttpMessageReceive interface. The HttpRequest
class's default behavior would be to just populate the superglobals
(i.e. having the same net-effect as the current behavior).
If a user wanted to override that default behavior they would just
extend HttpRequest and implement the functions/methods they wanted to
override.
Let me repeat my question:
Say I write a class "AwesomeHTTPReceive implements HttpMessageReceive",
what do I then do with this class in order for it to perform any actions?
How does PHP know that my class is the one it should populate, or when
that population should happen?