Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56462 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48467 invoked from network); 21 Nov 2011 19:07:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Nov 2011 19:07:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=cpriest@zerocue.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=cpriest@zerocue.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zerocue.com designates 74.115.204.51 as permitted sender) X-PHP-List-Original-Sender: cpriest@zerocue.com X-Host-Fingerprint: 74.115.204.51 relay-hub201.domainlocalhost.com Received: from [74.115.204.51] ([74.115.204.51:43004] helo=relay-hub201.domainlocalhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/32-29275-371AACE4 for ; Mon, 21 Nov 2011 14:07:34 -0500 Received: from MBX201.domain.local ([169.254.1.105]) by HUB201.domain.local ([74.115.204.51]) with mapi id 14.01.0289.001; Mon, 21 Nov 2011 14:07:29 -0500 To: "internals@lists.php.net" Thread-Topic: Supprting static getter/setter Thread-Index: Acyof43aBhegpY8cRzyhUzW0xTxfHw== Date: Mon, 21 Nov 2011 19:07:32 +0000 Message-ID: <9570D903A3BECE4092E924C2985CE48539939145@MBX201.domain.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.64.25] Content-Type: multipart/alternative; boundary="_000_9570D903A3BECE4092E924C2985CE48539939145MBX201domainloc_" MIME-Version: 1.0 Subject: Supprting static getter/setter From: cpriest@zerocue.com (Clint M Priest) --_000_9570D903A3BECE4092E924C2985CE48539939145MBX201domainloc_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I've implemented a good majority of the getter/setter syntax for objects wh= ich was pretty easy due to the already implemented functionality of __get()= /__set(). For static getters/setters there is no such obvious place to hook the new f= unctionality, I was considering modifying the ZEND_ASSIGN opcode which woul= d look back to the previous opcode (which should be a ZEND_FETCH_W) to iden= tify the class/variable and then call the setter when appropriate. Does that seem like a good strategy or would you recommend some other way? -Clint --_000_9570D903A3BECE4092E924C2985CE48539939145MBX201domainloc_--