Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57949 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60675 invoked from network); 22 Feb 2012 15:03:57 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2012 15:03:57 -0000 Authentication-Results: pb1.pair.com smtp.mail=will.fitch@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=will.fitch@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) X-PHP-List-Original-Sender: will.fitch@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:54789] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/08-09421-AD3054F4 for ; Wed, 22 Feb 2012 10:03:55 -0500 Received: by qady23 with SMTP id y23so6495294qad.8 for ; Wed, 22 Feb 2012 07:03:50 -0800 (PST) Received-SPF: pass (google.com: domain of will.fitch@gmail.com designates 10.229.76.139 as permitted sender) client-ip=10.229.76.139; Authentication-Results: mr.google.com; spf=pass (google.com: domain of will.fitch@gmail.com designates 10.229.76.139 as permitted sender) smtp.mail=will.fitch@gmail.com; dkim=pass header.i=will.fitch@gmail.com Received: from mr.google.com ([10.229.76.139]) by 10.229.76.139 with SMTP id c11mr23864899qck.1.1329923030572 (num_hops = 1); Wed, 22 Feb 2012 07:03:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:message-id:in-reply-to:references:subject:x-mailer :mime-version:content-type; bh=UMRfrJKYCOSg2P5Ytju4RY+j7Xm2FlbZaxgT3j1Vz/M=; b=WYRye45r7jM0ZuKh0fZJEBz3GphEWCaLm8do+BZX5JzejfSHxWLcflBp8nGp22MrXV C/DFvGCv1wHkdbEaB0MtxrxpNPZGXovp5N5pi/lxR7xYKfAGLSk0rMkLDJ7HUQqzo11l 1c7MMtH8ZOE6XGxlH67e+zM4tpf49rTAENATk= Received: by 10.229.76.139 with SMTP id c11mr20101166qck.1.1329923030486; Wed, 22 Feb 2012 07:03:50 -0800 (PST) Received: from Wills-MacBook-Air.local ([68.64.144.221]) by mx.google.com with ESMTPS id c2sm66723192qao.15.2012.02.22.07.03.49 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Feb 2012 07:03:49 -0800 (PST) Date: Wed, 22 Feb 2012 10:03:50 -0500 To: Michael Morris Cc: PHP Internals List Message-ID: <8D8E9A0839FE464FBBDF2B499DAFA596@gmail.com> In-Reply-To: References: X-Mailer: sparrow 1.5 (build 1043.1) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="4f4503d6_7c3dbd3d_6ecc" Subject: Re: [PHP-DEV] $_PARAMETERS Super Global Object From: will.fitch@gmail.com (Will Fitch) --4f4503d6_7c3dbd3d_6ecc Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Personally, I don't like this. We already have $_REQUEST which can accommodate GET, POST, and COOKIE. I believe it should be up to framework/API authors to implement there own methodologies behind accessing this data. Additional functionality such as setting filters would be a part of that as well. That said, if you're serious about the idea, a RFC would be helpful in understanding the full extent that you're suggesting. -- Will Fitch On Wednesday, February 22, 2012 at 9:57 AM, Michael Morris wrote: > Before writing up a full RFC I want to put out a feeler on something. > Currently we have several input parameter objects, chief among them > $_GET, $_POST, $_REQUEST, $_SERVER (for the client HTTP headers). All > of them are arrays and legacy code sometimes writes to them. Locking > them as read only objects would cause a major BC break. > > What if instead we had an Object called $_PARAMETERS which holds the > read only copies of this data. In addition, this would be the first > superglobal object, able to perform some filtering of inputs. Basic > idea.. > > $_PARAMETERS > ->get > ->post > ->cookie > ->headers (The client http headers) > > All of these would be array objects, and all would be read only and > have these methods and properties > > ->filtered: Copy of the array according to the current set filters of > the object. > ->setFilters(): Sets the filters of the input, an array with constant > values for the allowed types. > > And I'll stop there. The basic idea, to add a read only input hive > with some basic object functionality for filtering. > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --4f4503d6_7c3dbd3d_6ecc--