Re: PEAR_DelegateOwner

From: Date: Sat, 08 Nov 2003 09:55:54 +0000
Subject: Re: PEAR_DelegateOwner
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-23346@lists.php.net to get a copy of this message
On Tue Nov 04, 2003 at 04:3557PM -0500, LingWitt@insightbb.com wrote: > I have sent my work on the delegation classes. There are two files. One > contains the PEAR_DelegateInterface adopted by all objects that intend > to offer themselves for delegation. The other contains the > PEAR_DelegateOwner class from which all classes that intend to have > this capability inherit (though I think these methods would be better > off in the PEAR class). I'm against integrating the code directly into the PEAR base class. > You add either a delegate object or a delegate class (string or class > name from which the object is created) to a delegate owner, which > records the delegate along with its class. When a non-native method is > called on a delegate owner, the owner checks to see whether or not one > of its delegates can handle it. If none can, then it dies with an error > (the format of which probably needs to be modified). If one can, the > method-delegate relationship is cached for future reference, thereby > making the process as efficient as possible. > > I would like to have some feedback, so please take a look at it and > tell me what you think. Thanks. Looks fancy for me. However I also don't like the idea of having more than one delegate per class. Apart from that there has to be end-user documentation (either in plain text or Docbook), so that it gets my +1. -- - Martin Martin Jansen http://martinjansen.com/

« previous php.pear.dev (#23346) next »