Re: [PHP] static __get function

2004-04-24 Thread David Goodlad
Hi Marek Thanks for the response Two things you should notice is my declaration of the constructor as private and the $ConfigSettings variable as static. This class is designed in such a way that it can never be instantiated, preventing loading the configuration file twice and possibly having

Re: [PHP] static __get function

2004-04-24 Thread Marek Kilimajer
I'm not sure if it will help but do't define the magic functions as public static, use just: function __get(...) The function is not public anyway, as it should no be called directly. And to my knowledge self:: references a class, not an object. You should use $this-> instead. David Goodlad s

[PHP] static __get function

2004-04-23 Thread David Goodlad
Hi all... I'm trying to build a simple configureation class (using the singleton pattern). Using PHP5, I want to use the __get and __set methods to access configuration settings for my site. However, they don't work :P Here's my class definition: class Configuration { static private