Hey!
I am creating a small php framework and I have a few classes that use the singleton design pattern. Like for example my Session class uses the singleton pattern because in theory I will only really need one instantiation of the class.
I recently discovered the registry pattern (actually new about it for a while but it sort of came to my mind recently), and so I thought that instead of duplicating code (using php 5.2.12, I still need to create the getInstance method with the class name, only in 5.3 is it possible to create the singleton pattern in a parent class) I could just have a registry class and call my classes with the singleton pattern from there.
Currently in my framework there aren't that many classes implementing the singleton pattern, so the registry class wouldn't have many, but it's still in the early stages so I might find it useful to store some more stuff.
So any ideas or thoughts on this?