Search Results

Search found 1 results on 1 pages for 'cakyus'.

Page 1/1 | 1 

  • Extending a singleton class

    - by cakyus
    i used to create an instance of a singleton class like this: $Singleton = SingletonClassName::GetInstance(); and for non singleton class: $NonSingleton = new NonSingletonClassName; i think we should not differentiate how we create an instance of a class whether this is a singleton or not. if i look in perception of other class, i don't care whether the class we need a singleton class or not. so, i still not comfortable with how php treat a singleton class. i think and i always want to write: $Singleton = new SingletonClassName; just another non singleton class, is there a solution to this problem ?

    Read the article

1