Greg Beaver [2005-02-14 05:22 UTC]I think this will be a great addition to PEAR (have said so in the past).
The slimmer you can get the code, the better. I would definitely put all of the major non-essential features into a class that can be easily delegated into PEAR_Delegate, or even automatically delegated on demand (very cool feature to have).
Herr Witten [2005-02-19 18:08 UTC]"The slimmer you can get the code, the better. I would definitely put all of the major non-essential features into a class that can be easily delegated into PEAR_Delegate,.."
This is actually already the case. I could, however, move a few other methods over:
Yet, the bottom two are kind of essential to the concepts of delegation, and that makes it a little unnecessary to remove the top two, since they aren't too big. Any suggestions will be welcome though.
Herr Witten [2005-02-19 18:19 UTC]"or even automatically delegated on demand (very cool feature to have)."
This would be neat, but it seems messy.
The main Delegator.php file could have these methods simply load and add the proper extension delegate. Then they would call the delegated method from then on. Yet, how should the extension code be split up? Should each method have its own extension file?
Here is the list of extensions so far:
Stephan Schmidt [2005-02-23 12:11 UTC]I really like the package and would love to have this in PEAR.
Some short comments:
- Please adjust your code to PEAR coding standards
- Think about using PEAR_Exception instead of the built-in Exception class. It provides some cool features like pretty-printed output and observers
- Why don't you declare cacheMethod() as private if it should not be called from outside the class?
- Why are you extending PEAR? I only found to calls to raiseError() which actually encapsulate exceptions. I'd prefer if you package this exception into a new PEAR_Exception and throw this instead of using PEAR_Error objects.
but apart from that, this package is really great. Thanks for your contribution.