On Jan 16, 2008 5:06 PM, Nathan Nobbe <quickshiftin@xxxxxxxxx> wrote: > On Jan 16, 2008 4:55 PM, Jochem Maas <jochem@xxxxxxxxxxxxx> wrote: > > > Eric Butera schreef: > > > > > > > > > > > I still don't understand the obsession of a singleton in regards to a > > > db connection. Using a registry is a much better practice I think. > > > > > > > I think I alluded to the registry pattern in my reply above - although I'm > not > > sure. could you care to ellaborate what you mean by registry? > > > > though i havent seen registry defined in any of the few patterns books ive > seen; > i think its supposed to be a list of singletons, essentially; if you want a > 'global' > registry that is. and i suppose the registry class would itself be a > singleton as well. > here is a somewhat concrete definition / explanation / example.. > http://www.phppatterns.com/doku.php/design/the_registry > > -nathan > Here is an implementation: http://framework.zend.com/manual/en/zend.registry.html Here is another: http://www.stubbles.net/browser/trunk/src/main/php/net/stubbles/util/stubRegistry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php