Exemplo n.º 1
0
 public static function getInstance($cacheFolder = NULL)
 {
     if (is_null(self::$instance)) {
         self::$instance = new self($cacheFolder);
     }
     return self::$instance;
 }
Exemplo n.º 2
0
 public static function GetInstance($exp_time = 3600, $path = 'cache/')
 {
     if (!isset(self::$instance)) {
         //doesn't exists the isntance
         self::$instance = new self($exp_time, $path);
         //goes to the constructor
     }
     return self::$instance;
 }
Exemplo n.º 3
0
 /**
  * Set the singleton instance to a given object
  */
 static function setSingleton($instance)
 {
     self::$instance = $instance;
 }