Re: Re: Function Cache

From: Date: Mon, 11 Dec 2000 15:51:53 +0000
Subject: Re: Re: Function Cache
References: 1 2 3 4 5 6 7 8 9  Groups: php.dev php.pear 
Request: Send a blank email to php-dev+get-40846@lists.php.net to get a copy of this message
>On Mon, 11 Dec 2000, Kristian Köhntopp wrote: >> Yep. That is why I was calling it _delegate() at first. Using >> such a function, you can define a delegate object for any object, >> just as I did with my example > >I actually happen to think that __delegate() method or something >similarly named is a pretty good idea and should not offend anyone too >much. :) I mean we already have __sleep() and __wakeup() method support >in serialization layer, and adding __delegate() does not look very >tough. Could be implemented and tested in a couple of hours. Yup, but it gets a little tricky unless you either add it to the users symbol table (at the cost of an extra if statement per function call). Or you set it as a global variable (no real speed cost unless you use it). Otherwise you would need to reconstruct the function argument stack... I already have implemented it with just adding a $AUTOLOAD (or whatever) variable to the global (or local) symbol table... -Sterling

« previous php.dev (#40846) next »