PHP - class question
| From: | Mark Armendariz | Date: | Wed, 14 Aug 2002 18:43:58 +0000 |
| Subject: | PHP - class question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-112577@lists.php.net to get a copy of this message | ||
Hello, To begin.. i'm new to the list...
I'm trying to learn good practices in OOP based PHP. I'm actually a bit new
to OOP in general, but I've done quite a bit of reading and playing around
with it in the past couple of months.
What I'm trying to figure out is the proper way to call a class from a
class. I dont mean by extending the class, but actaully just getting the
functions...
For instance...
I'm trying to connect to a Database (database class) from my gen_XML class.
Do I include the database class in the gen_XML constructor? Do I set a
gen_XML variable as a database object (i.e. $this->mydb)?
I hope my question makes some sense...
Your help is appreciated...
Mark Armendariz