Okay, so I'm new to OO and still kinda new to PHP5.
I have a class Page that creates an instance of DB, which is named $db.
In the __construct() of Page, I create the new $db object and I pull a bunch of config data from a file.
Now the DB class has a method _connectToDB() which (attempts) to connect to the database.
Is there a way in the DB class to call the parent class's config array? I don't want to make global variables if I don't have to and I don't want to grab the config data twice.
Pseudo code might look something like this
$dbUsername = get_calling_class_vars(configArray['dbUserName']);
Thank you