RE: [PEAR] Using the DB methods in another class

From: Date: Wed, 13 Feb 2002 13:14:34 +0000
Subject: RE: [PEAR] Using the DB methods in another class
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-848@lists.php.net to get a copy of this message
You can have a look at the Auth class, it's a pretty good start on how to do that ;) > -----Original Message----- > From: Ron Dyck [mailto:adam@webbtech.net] > Sent: Wednesday, February 13, 2002 2:03 PM > To: PEAR General List > Subject: [PEAR] Using the DB methods in another class > > > 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 > > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.pear.general (#848) next »