Re: Re: [PROPOSAL] DB_Simple
| From: | Marshall Roch | Date: | Fri, 31 Oct 2003 23:06:54 +0000 |
| Subject: | Re: Re: [PROPOSAL] DB_Simple | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-23167@lists.php.net to get a copy of this message | ||
Davey wrote:
I think that we should *really* think about offering this up as a sample on how to propose a package.Definitely agreed. Very nice job, Paul. <snip>
Also, I see no reason for you to be extending PEAR, you only see to use PEAR::isError and as you call that statically, no extension of the PEAR class is needed.If that's the only thing PEAR is used for, you don't need to use PEAR.php at all. Greg suggested the following for File_IMC: if (is_a($err, 'PEAR_Error')) { . . } // For PHP < 4.2.0 if (!function_exists('is_a')) { function is_a($obj, $classname) { return get_class($obj) == strtolower($classname) || is_subclass_of($obj, $classname); } } -- Marshall Roch http://pear.php.net/user/mroch