Using the DB methods in another class
| From: | Ron Dyck | Date: | Wed, 13 Feb 2002 13:02:50 +0000 |
| Subject: | Using the DB methods in another class | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-847@lists.php.net to get a copy of this message | ||
What is the best way to use methods from the DB class in another class.
When I used phplib I did the following:
function start_db() {
$name = $this->database_class;
$this->db = new $name;
But I don't feel this is the best way to do it with PEAR's DB because the
class is not normally instantiated using 'new'.
=======================
Ron Dyck
WebbTech
www.webbtech.net
rhd@webbtech.net