Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27951 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87929 invoked by uid 1010); 9 Feb 2007 17:10:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87913 invoked from network); 9 Feb 2007 17:10:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2007 17:10:25 -0000 Authentication-Results: pb1.pair.com header.from=cschneid@cschneid.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=cschneid@cschneid.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain cschneid.com from 195.141.85.117 cause and error) X-PHP-List-Original-Sender: cschneid@cschneid.com X-Host-Fingerprint: 195.141.85.117 uf1.search.ch Linux 2.4/2.6 Received: from [195.141.85.117] ([195.141.85.117:55978] helo=smtp.rim.ch) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F8/D0-18147-EFAACC54 for ; Fri, 09 Feb 2007 12:10:24 -0500 Received: from localhost (localhost [127.0.0.1]) by rolig.search.ch (Postfix) with ESMTP id 138CF1A1737; Fri, 9 Feb 2007 18:10:20 +0100 (CET) Received: from smtp.rim.ch ([127.0.0.1]) by localhost (search.ch [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05163-10; Fri, 9 Feb 2007 18:10:14 +0100 (CET) Received: from [192.168.1.72] (ultrafilter-i [192.168.85.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rolig.search.ch (Postfix) with ESMTP id D9AF11A1716; Fri, 9 Feb 2007 18:10:14 +0100 (CET) Message-ID: <45CCAAF6.6070707@cschneid.com> Date: Fri, 09 Feb 2007 18:10:14 +0100 User-Agent: Thunderbird 1.5.0.9 (X11/20060911) MIME-Version: 1.0 To: Jim Wilson CC: internals@lists.php.net References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at search.ch Subject: Re: Reflection API Injection Mechanism From: cschneid@cschneid.com (Christian Schneider) Jim Wilson wrote: > 1) Is there a way to inject a method into a Class such that future > instantiations of that Class will have the method? For example: > > 2) Is there a way to change a method which already exists, as in by > overwriting it with a new function? I'm looking to do the equivalent of > JavaScript's 'function as member' treatment, where it's easy to do > something See php.net/runkit - Chris