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