Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:57948 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58617 invoked from network); 22 Feb 2012 14:57:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Feb 2012 14:57:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmgx.michael@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmgx.michael@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.54 as permitted sender) X-PHP-List-Original-Sender: dmgx.michael@gmail.com X-Host-Fingerprint: 74.125.82.54 mail-ww0-f54.google.com Received: from [74.125.82.54] ([74.125.82.54:53220] helo=mail-ww0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/B7-09421-A52054F4 for ; Wed, 22 Feb 2012 09:57:30 -0500 Received: by wgbdq12 with SMTP id dq12so101095wgb.11 for ; Wed, 22 Feb 2012 06:57:27 -0800 (PST) Received-SPF: pass (google.com: domain of dmgx.michael@gmail.com designates 10.180.24.202 as permitted sender) client-ip=10.180.24.202; Authentication-Results: mr.google.com; spf=pass (google.com: domain of dmgx.michael@gmail.com designates 10.180.24.202 as permitted sender) smtp.mail=dmgx.michael@gmail.com; dkim=pass header.i=dmgx.michael@gmail.com Received: from mr.google.com ([10.180.24.202]) by 10.180.24.202 with SMTP id w10mr36144778wif.9.1329922647771 (num_hops = 1); Wed, 22 Feb 2012 06:57:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=MHDu3seghcjNbc55JjiAFY1pdejQwKRUqpr+AKjhBEY=; b=otlu9j/CxySZrr0mhZpAsb1gRBInQQecwKSkZnyAnasIZ0P+p1Ddat0O/C8Lc70QJy Ell01OqgxpDxcX0xjwVKOe9aXbGC7af6C/lWLkszoc97+kn7ejx2XoHADCfZ271GGBoy OBybrFJnjz72JouGu7nDISKM4YV6piuSHpkZI= MIME-Version: 1.0 Received: by 10.180.24.202 with SMTP id w10mr29907761wif.9.1329922647626; Wed, 22 Feb 2012 06:57:27 -0800 (PST) Received: by 10.216.30.149 with HTTP; Wed, 22 Feb 2012 06:57:27 -0800 (PST) Date: Wed, 22 Feb 2012 09:57:27 -0500 Message-ID: To: PHP Internals List Content-Type: text/plain; charset=ISO-8859-1 Subject: [PHP-DEV] $_PARAMETERS Super Global Object From: dmgx.michael@gmail.com (Michael Morris) 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.