Exemple #1
0
 public static function getInstance($seconds = 15)
 {
     if (empty(self::$instance)) {
         $class = __CLASS__;
         self::$instance = new $class($seconds);
     }
     return self::$instance;
 }
Exemple #2
0
 /**
  * Provided only for tests that want to kill object in tearDown()
  */
 public static function destroyInstance() {
     if (isset(self::$instance)) {
         self::$instance = null;
     }
 }