Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78508 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 83357 invoked from network); 31 Oct 2014 14:30:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 Oct 2014 14:30:57 -0000 Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.169 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.212.169 mail-wi0-f169.google.com Received: from [209.85.212.169] ([209.85.212.169:46273] helo=mail-wi0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/50-15608-F1D93545 for ; Fri, 31 Oct 2014 09:30:56 -0500 Received: by mail-wi0-f169.google.com with SMTP id n3so1437206wiv.0 for ; Fri, 31 Oct 2014 07:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=6yoRktwaYEgWJeh5PJ60TXaWh+SDgh7gYBJNVe1EXxA=; b=ZxWIUkexw/fC23G8OwMhKqxrBX/xhHOLS35JEHVErBQ5sBSGYDY30s//qmKr8/krHJ vTRUgkTjGPPWvNilBHHY9F51TkTGa3H3qGxIxtHaX00umWtMJ9jpGe6wAuGjD1tA/GPc A6q1IpfX1yEXNO367Sfet5N+yHbHZyK6o8CmHPkxz/Bgj4q/9EKNoAZyYx6KcDkENmTo 69l+a5Ge8mVEBnmo14iYnx3yHUBMNPQ4lKo1tq1G1KW0ZIoxYHgPXsI/sVHOLMxKhF1i DKWJE1W8VEFz1qot5BvKHj2PTxdbCeM0x+uNm/iY7U6Us/a96ePplTKFB/URvjLpnWMK VLTQ== MIME-Version: 1.0 X-Received: by 10.180.212.110 with SMTP id nj14mr4272812wic.45.1414765852736; Fri, 31 Oct 2014 07:30:52 -0700 (PDT) Received: by 10.216.123.4 with HTTP; Fri, 31 Oct 2014 07:30:52 -0700 (PDT) In-Reply-To: <0B797CE3-7AFA-4330-9A98-D3CAFC6D6072@ajf.me> References: <5452B87B.5040009@garfieldtech.com> <0B797CE3-7AFA-4330-9A98-D3CAFC6D6072@ajf.me> Date: Fri, 31 Oct 2014 10:30:52 -0400 Message-ID: To: Andrea Faulds Cc: Larry Garfield , PHP Internals Content-Type: multipart/alternative; boundary=001a11c3416017bfe70506b8d89e Subject: Re: [PHP-DEV] New Standardized HTTP Interface From: theanomaly.is@gmail.com (Sherif Ramadan) --001a11c3416017bfe70506b8d89e Content-Type: text/plain; charset=UTF-8 On Fri, Oct 31, 2014 at 5:25 AM, Andrea Faulds wrote: > > > This is no less of a backwards-compatibility headache. This still breaks > every PHP app I have ever written. > > To be perfectly clear, the default behavior would remain the same, so no PHP app you have ever written would break. The difference is, you would now be able to override any part of the default behavior by extending the HttpRequest class in your own code. > > > No no, I'm not concerned about the contents of the interface. I'm > wondering what, exactly, this "interface" does? I don't see how a mere > interface would replace the superglobals, unless you want a superglobal > request object that anyone can swap out, which sounds like a bad idea. > > The interfaces do exactly what you see here. They specified which methods the HttpRequest and HttpResponse objects must implement. If you bothered to invest nearly as much time in reading the updates to the RFC as you did to making blanket statements and objections, you might actually find less reason to respond with objections so abruptly. The HttpRequest and HttpResponse classes are intended to provide a central place for message handling behaviors and their properties can be used to describe these behaviors. So, if you wanted to support a $_PUT superglobal, rather than adding one to the language, you can simply add the behavior to do the processing of PUT requests in your HttpRequest class, by extending HttpRequest and defining how PUT variables are handled there. > -- > Andrea Faulds > http://ajf.me/ > --001a11c3416017bfe70506b8d89e--