Esempio n. 1
0
 public static function newInstance()
 {
     if (!self::$instance instanceof self) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 2
0
 public static function getInstance()
 {
     if (empty(self::$instance)) {
         self::$instance = new Preference();
     }
     return self::$instance;
 }