[PEPr] Comment on Database::DB_Table_Database
| From: | Justin Patrin | Date: | Sun, 05 Nov 2006 18:34:02 +0000 |
| Subject: | [PEPr] Comment on Database::DB_Table_Database | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-44850@lists.php.net to get a copy of this message | ||
Justin Patrin (http://pear.php.net/user/justinpatrin) has commented on the proposal for
Database::DB_Table_Database.
Comment:
Why have "({$db->phptype})"? Just do $db->phptype.
DB_Table is a PHP4 package. DB_Table_Database has PHP5 syntax in it but
uses PEAR_Error. I suggest removing all of the PHP5 syntax
(public/protected) to keep compatibility with PHP4 as DB_Table is PHP4
only.
I see various comments that say that an error should be thrown. You should
probably take care of this.
array_key_exists can be much slower than isset. If you don't need to check
for NULL values in your arrays then isset is a better choice.
Looks pretty good otherwise. :-)
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=456
--
Sent by PEPr, the automatic proposal system at http://pear.php.net