Re: Extending PEAR::DB (static constructor issue?)
| From: | weston at leary dot csoft dot net | Date: | Fri, 10 Mar 2006 04:42:00 +0000 |
| Subject: | Re: Extending PEAR::DB (static constructor issue?) | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-23257@lists.php.net to get a copy of this message | ||
> However, if you'd actually looked into the connect method you'd know
> that you don't even get a DB back.
Mea culpa. :)
My only excuse is that sometimes half the reason we're interested in this OO thing is to be
abel to re-use with minimal understanding of the internals of what we're reusing.
My sin here probably consisted of innapropriately estimating where the bar for that minimal
understanding is....
> The right way to extend DB would be to extend a specific driver and
> use that in your DSN. For example, I had a oci8ext driver that I used
> to add some extra oci8 functions.
>
> This of course means that you're making changes specific to the
> driver, but there is no way to get around this with DB.
Is this really true? Couldn't I, for example, hack DB_common instead? Avoiding some of the
details relating to the specific databases is part of the reason why I'm trying to come to
PEAR::DB...
I guess, though, that even if I can add stuff to DB_common, then I'm facing the prospect of
merging those every time I want to update.
Writing a wrapper around PEAR::DB is starting to seem like the more appealing option.
-W