Esempio n. 1
0
 public static function getInstance()
 {
     if (self::$instance === false) {
         self::$instance = new self();
     }
     return self::$instance;
 }
Esempio n. 2
0
 public static function getInstance()
 {
     if (!isset(self::$instance)) {
         $object = __CLASS__;
         self::$instance = new $object();
     }
     return self::$instance;
 }