[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-developers] Proposal - DB Classes Changes in the API
From: |
Dave Hall |
Subject: |
[Phpgroupware-developers] Proposal - DB Classes Changes in the API |
Date: |
Mon, 14 Jul 2003 17:26:13 +1000 |
Hi all,
I will be sending through a few API changes proposals. Most of this I
will need to do as part of another project which will run within phpGW,
so I am happy to fix it.
Here is the first one :)
Databases
The OO design is a little screwy. Some duplication can be reduced by
moving some of the function to the common db class - for example the
db_*slashes methods, and they can be overriden in those classes that
need that.
The connect method of the classes are inconsistent. In mysql it accepts
4 args, which I like, but the other classes don't support this. I would
suggest that we add the functionality to the other classes. This would
allow:
$db = new db;
$db->connect($db,$host,$user,$pass);
instead of
$db = new db;
$db->Database = $db;
$db->Host = $host;
$db->User = $user;
$db->Password = $pass;
$db->connect();
A few less lines of code in the app, and it makes it simpler, imho.
dave.hall.vcf
Description: Card for <dave.hall@mbox.com.au>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-developers] Proposal - DB Classes Changes in the API,
Dave Hall <=