Re: New Standardized HTTP Interface

From: Date: Fri, 31 Oct 2014 17:32:18 +0000
Subject: Re: New Standardized HTTP Interface
References: 1 2 3 4 5 6 7 8 9  Groups: php.internals 
Request: Send a blank email to internals+get-78524@lists.php.net to get a copy of this message
Hi, Le 31 oct. 2014 18:28, "Sherif Ramadan" <theanomaly.is@gmail.com> a écrit : > > On Fri, Oct 31, 2014 at 1:09 PM, Rowan Collins <rowan.collins@gmail.com> > wrote: > > > > > 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? > > > > > It wouldn't. You would need to extend the base class, since it already > implements the necessary interface. PHP would simply call on the last > subtype of HttpRequest during the request init phase. What if there is multiple subtypes? class A extends HttpRequest {} class B extends HttpRequest {} What happens there? > Of course, this is an > implementation detail as of now. There could certainly be other/better ways > to accomplish this. I just want to keep it as simple as possible for now > without introducing more configuration nightmares that people often > complain about. I really don't like the idea of adding yet another INI > directive to control this behavior (making it harder to port). > > What do you propose? Regards, Florian Margaine

« previous php.internals (#78524) next »