10-22-2009, 06:05 AM
|
#4 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
You'll probably need to a) load the logging class as an object of your database class, or b) declare the necessary properties as static and reference it via 'parent::' from your child class.
Your Database object, even though it extends the Base class, does not have access to the same properties that your Base object does. This is because they are essentially two seperate objects with their own set of properties - they're just sharing methods (physically they wouldn't share the same bubble, each is inside their own). You can visualize this by declaring some random properties in each, and then dumping $this with print_r() or var_dump().
This would probably be a great time to learn about design patterns. In particular, you might want to learn how to generate a singleton. Rather straight forward, and I believe Tony Marston has a very good write up on how to go about it on his site.
-m
|
|
|
|