예제 #1
0
 public function __construct($cache = null)
 {
     if (is_null($cache)) {
         $cache = SimpleCache::instance();
     }
     $this->_cacheImpl = $cache;
 }
예제 #2
0
파일: Caches.php 프로젝트: rsinger/Jangle
 public function singleton()
 {
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
     return self::$instance;
 }