Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:21426 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54414 invoked by uid 1010); 5 Jan 2006 01:18:39 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54399 invoked from network); 5 Jan 2006 01:18:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2006 01:18:39 -0000 X-Host-Fingerprint: 147.202.47.146 cruiser.plexpod.net Linux 2.5 (sometimes 2.4) (4) Received: from ([147.202.47.146:52458] helo=cruiser.plexpod.net) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 01/03-34518-DE37CB34 for ; Wed, 04 Jan 2006 20:18:37 -0500 Received: from dsl254-067-175.nyc1.dsl.speakeasy.net ([216.254.67.175] helo=desario.homelinux.net) by cruiser.plexpod.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.52) id 1EuJln-0002NO-Sp; Wed, 04 Jan 2006 20:18:24 -0500 Received: by desario.homelinux.net (sSMTP sendmail emulation); Wed, 4 Jan 2006 20:14:51 -0500 Date: Wed, 4 Jan 2006 20:14:51 -0500 To: Sara Golemon Cc: internals@lists.php.net, Marcus Boerger Message-ID: <20060105011450.GB26280@desario.homelinux.net> References: <20060103205728.GF26280@desario.homelinux.net> <007001c6117d$1ba7e510$5c8be5a9@ohr.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <007001c6117d$1ba7e510$5c8be5a9@ohr.berkeley.edu> User-Agent: Mutt/1.5.11 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cruiser.plexpod.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - plexpod.com X-Source: X-Source-Args: X-Source-Dir: Subject: Re: [PHP-DEV] Re: __call overload detection From: andrew@plexpod.com (Andrew Yochum) On Wed, Jan 04, 2006 at 02:20:45PM -0800, Sara Golemon wrote: > > Currently there is no way to detect if the __call overloads a particular > > method. Property overloading has __isset now in 5.1 - maybe for method > > overloading the equivalent should be something like __iscallable. Maybe > > method_exists should remain as is, as the method won't ever really exist > > but is_callable would/could use it, or perhaps some new function. > > > This'll do what you want: > > http://libssh2.org/dist/callable-1.0.tgz > > It's PEAR packaged so compiling/installing should be simple enough.... Dunno > if it's worth dropping into PECL though... > > -Sara Thanks Sara. Nice to see that others have the need. Works like a charm. You rock. Marcus, is this along the lines of what you had in mind for the (possible) implementation? This doesn't use interfaces, but that seems trivial. I wasn't clear if you'd envisioned taking it one step further and do the check before invocations of __call or not. Regards, Andrew -- Andrew Yochum Plexpod andrew@plexpod.com 718-360-0879