protected function __construct($collection) { $this->collection = $collection; if (isset(\Config::$mongo)) { $this->mongo = CConnMgr::getInstance()->mongo(\Config::$mongo); } }
protected function __construct($table, $pk = 'id') { $this->table = $table; $this->pk = $pk; if (isset(\Config::$db)) { $this->pdo = CConnMgr::getInstance()->pdo(\Config::$db); } }
public function __construct($prefix, $redis = null) { $this->prefix = $prefix; if ($redis == null) { $this->redis = CConnMgr::getInstance()->redis(\Config::$cache['redis']); } else { $this->redis = $redis; } }
public function __construct($prefix, $memcached = null) { $this->prefix = $prefix; if ($memcached == null) { $this->memcached = CConnMgr::getInstance()->mem(\Config::$cache['memcache']); } else { $this->memcached = $memcached; } }