php Singleton pattern with Abstract class and Interface

y mano

New Member
I am developing a framework. And I have confronted with some difficulties. For Database I have created Abstract class, Interface and some Adapters for different SCDB. For example, Mysqli adapter has the constructor, which call the constructor of parent with settings array as parameter. Mysqli class uses the next scheme:\[code\]class Hybrid_Db_Adapter_Mysqli extends Hybrid_Db_Adapter_Abstract implements Hybrid_Db_Adapter_Interface {}\[/code\]My task is create a Singleton pattern for this situation. It good for Database, because we can create only one instance.I don't know, how create this Singleton for me. I want to knew, where getInstance function I should to define.
 
Back
Top