title: What is the best way to create a Singleton Webservice in PHP?
body: <p>We have a need to access a DB that only allows one connection at a time.  This screams "singleton" to me.  The catch of course is that the singleton connection will be exposed (either directly or indirectly) via a web-service (most probable a SOAP based web-service - located on a separate server from the calling app(s) ) - which means that there may be more than one app / instance attempting to connect to the singleton class.</p>
  
  <p>In PHP, what is the best way to create a global singleton or a web-service singleton?</p>
  
  <p>TIA</p>