function datastore_apc($prefix = null) { if (!$this->is_installed()) { die('Error: APC extension not installed'); } $this->dbg_enabled = sql_dbg_enabled(); $this->prefix = $prefix; }
function cache_xcache($prefix = null) { if (!$this->is_installed()) { die('Error: XCache extension not installed'); } $this->dbg_enabled = sql_dbg_enabled(); $this->prefix = $prefix; }
function cache_redis($cfg, $prefix = null) { if (!$this->is_installed()) { die('Error: Redis extension not installed'); } $this->cfg = $cfg; $this->prefix = $prefix; $this->redis = new Redis(); $this->dbg_enabled = sql_dbg_enabled(); }
function cache_memcache($cfg, $prefix = null) { if (!$this->is_installed()) { die('Error: Memcached extension not installed'); } $this->cfg = $cfg; $this->prefix = $prefix; $this->memcache = new Memcache(); $this->dbg_enabled = sql_dbg_enabled(); }
/** * Constructor */ function sql_db($cfg_values) { global $DBS; $this->cfg = array_combine($this->cfg_keys, $cfg_values); $this->dbg_enabled = sql_dbg_enabled(); $this->slow_time = SQL_SLOW_QUERY_TIME; $this->DBS['num_queries'] =& $DBS->num_queries; $this->DBS['sql_inittime'] =& $DBS->sql_inittime; $this->DBS['sql_timetotal'] =& $DBS->sql_timetotal; }
/** * Constructor */ function sql_db($cfg_values) { global $DBS; $this->cfg = array_combine($this->cfg_keys, $cfg_values); $this->dbg_enabled = sql_dbg_enabled() || !empty($_COOKIE['explain']); $this->do_explain = $this->dbg_enabled && !empty($_COOKIE['explain']); $this->slow_time = SQL_SLOW_QUERY_TIME; // ссылки на глобальные переменные (для включения логов сразу на всех серверах, подсчета общего количества запросов и т.д.) $this->DBS['log_file'] =& $DBS->log_file; $this->DBS['log_counter'] =& $DBS->log_counter; $this->DBS['num_queries'] =& $DBS->num_queries; $this->DBS['sql_inittime'] =& $DBS->sql_inittime; $this->DBS['sql_timetotal'] =& $DBS->sql_timetotal; }
function cache_file($dir, $prefix = null) { $this->dir = $dir; $this->prefix = $prefix; $this->dbg_enabled = sql_dbg_enabled(); }
function sqlite_common($cfg) { $this->cfg = array_merge($this->cfg, $cfg); $this->dbg_enabled = sql_dbg_enabled(); }
function SphinxClient() { $this->dbg_enabled = sql_dbg_enabled(); // per-client-object settings $this->_host = "localhost"; $this->_port = 9312; $this->_path = false; $this->_socket = false; // per-query settings $this->_offset = 0; $this->_limit = 2000; $this->_mode = SPH_MATCH_ALL; $this->_weights = array(); $this->_sort = SPH_SORT_RELEVANCE; $this->_sortby = ""; $this->_min_id = 0; $this->_max_id = 0; $this->_filters = array(); $this->_groupby = ""; $this->_groupfunc = SPH_GROUPBY_DAY; $this->_groupsort = "@group desc"; $this->_groupdistinct = ""; $this->_maxmatches = 1000; $this->_cutoff = 0; $this->_retrycount = 0; $this->_retrydelay = 0; $this->_anchor = array(); $this->_indexweights = array(); $this->_ranker = SPH_RANK_PROXIMITY_BM25; $this->_maxquerytime = 0; $this->_fieldweights = array(); $this->_overrides = array(); $this->_select = "*"; $this->_error = ""; // per-reply fields (for single-query case) $this->_warning = ""; $this->_connerror = false; $this->_reqs = array(); // requests storage (for multi-query case) $this->_mbenc = ""; $this->_arrayresult = false; $this->_timeout = 0; }