Re: [PEPr] Comment on PEAR::PEAR_Delegator

From: Date: Wed, 23 Feb 2005 22:21:43 +0000
Subject: Re: [PEPr] Comment on PEAR::PEAR_Delegator
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-36374@lists.php.net to get a copy of this message
Thanks for the response. On 23 Feb 2005, at 7:11, Stephan Schmidt wrote:
I really like the package and would love to have this in PEAR. - Please adjust your code to PEAR coding standards
I have updated the source, though the only breeches of standards I found were with curly braces. Let me know if I missed something.
- Think about using PEAR_Exception instead of the built-in Exception class. It provides some cool features like pretty-printed output and observers
I'll take a look into that. Thanks.
- Why don't you declare cacheMethod() as private if it should not be called from outside the class?
Initially it was private, but I came across some problem that was internal to PHP. Perhaps it has been changed now. At first glance, I can't tell why it shouldn't be private either. There are other methods that could be made private as well. I'll check it out further. Perhaps protected would be better.
- 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.
I extend PEAR because there is no multiple inheritance. People would probably want to have a PEAR class as well as a delegator. Besides, it's logically pleasing to have one pure root class.
but apart from that, this package is really great. Thanks for your contribution.


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