RE: [PEAR-DEV] RFC Nested Set manipulation class
| From: | Lukas Smith | Date: | Wed, 19 Mar 2003 15:19:13 +0000 |
| Subject: | RE: [PEAR-DEV] RFC Nested Set manipulation class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14456@lists.php.net to get a copy of this message | ||
> I am just thinking of putting the PEAR::DB dependency out of the main
> class.
> Then it would be possible to create a wrapper for PEAR::DB and
PEAR:MDB
> which
> can be dynamicly choosen by the user.
> As you see NestedSet has only a small set of methods which do the
database
> work.
> So these methods could be easily put into the wrappers.
>
> What do you say?
> I would be happy if you could do the MDB work as I don't use that yet.
>
> Thanks a lot for the suggestion
Great. Then it could have a similar structure than DB and MDB have.
Hans would you be willing to take care of this?
You have a common class and a class that extends it .. either with the
DB or the MDB method calls. The include would then be placed in the file
that extends the common class.
I have not looked at your class, but you would then need a factory class
to handle object creation which would wither return an instance of
DB_NestedSet (which extends Common_NestedSet) or MDB_NestedSet (which
also extends Common_NestedSet).
Regards,
Lukas