public function __construct($cache = null)
 {
     if (is_null($cache)) {
         $cache = SimpleCache::instance();
     }
     $this->_cacheImpl = $cache;
 }
Exemple #2
0
 public function singleton()
 {
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }