Okay, here's what I'm doing. I have a base class called WGS which loads two other classes, MySQLControl ($db) and User ($user). Now, my User class extends the WGS class, so I should be able to access WGS's methods using parent::. However, whenever I attempt to access my WGS->db, I get errors. For instance, I may try:
parent::db->setTable("table");
I've also tried creating a local variable for the User class:
$db = parent::db;
And I've tried making a function getDB in the WGS class, then accessing that:
function getDB() {
return $this->db;
}
$db = parent::getDB();
Basically what I'm trying to do here is create a very accessible class system, which will be used as an API for other developers.
Any help on this would be greatly appreciated!