public function __construct($page = 1, $num = 20) { parent::SphinxClient(); $this->_page = $page; $this->SetServer('localhost', 3312); $this->SetMatchMode(SPH_MATCH_EXTENDED); $this->SetLimits(($page - 1) * $num, $num); }
public function __construct() { parent::SphinxClient(); $ci = get_instance(); $ci->load->config('sphinx', TRUE); $this->config = $ci->config->item('sphinx'); foreach ($this->config as $k => $i) { @call_user_func_array(array($this, 'Set' . $k), $i); } $this->SetSortMode(SPH_SORT_EXTENDED, '@weight DESC, @id DESC'); }
function __construct() { // No inheritance nor interfaces yet, so roll our own BitBase constructor global $gBitDb; $this->mDb =& $gBitDb; $this->mErrors = array(); $this->mInfo = array(); $this->mIndex = NULL; // Startup Sphinx parent::SphinxClient(); }