Classes (Explained inside)
View Single Post
10-22-2009, 06:05 AM
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
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.
View Public Profile
Send a private message to delayedinsanity
Visit delayedinsanity's homepage!
Find More Posts by delayedinsanity