SphinxClient() public method

create a new client object and fill defaults
public SphinxClient ( )
Example #1
0
 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);
 }
Example #2
0
File: Sphinx.php Project: ilei/blog
 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');
 }
Example #3
0
 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();
 }