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