title: OOPHP suitable alternative to singleton pattern?
body: <p>I'm currently working on an oophp application. I have a site class which will contain all of the configuration settings for the app. Originally, I was going to use the singleton pattern to allow each object to reference a single instance of the site object, however mainly due to testing issues involved in this pattern, I've decided to try a different approach.</p>
  
  <p>I would like to make the site class the main parent class in my app and call it's constructor from within the constructors of the child classes, in order to make all the properties available whenever needed.</p>
  
  <p>When run for the first time, the class will only contain the db details for the app. To get the remaining values a query must be performed using the db details.  However, any subsequent instances will be clones of the original (with all values). I may also set a Boolean flag to perform the query again a completely new instance is required.</p>
  
  <p>Would this be a viable alternative to the singleton and would it solve the testing issues it causes? This is all theory atm, I haven't started to code anything yet,</p>
  
  <p>Any thoughts or advice greatly appreciated.
  Thanks.</p>