contributions/sphinx/model/drivers/sphinx/dbresultset.count.sphinx.php
Go to the documentation of this file.00001 <?php 00002 require_once dirname(__FILE__) . '/dbresultset.sphinx.php'; 00003 /** 00004 * Result set for Sphinx count queries 00005 * 00006 * @author Gerd Riesselmann 00007 * @ingroup Sphinx 00008 */ 00009 class DBResultSetCountSphinx extends DBResultSetSphinx { 00010 protected $done = false; 00011 00012 /** 00013 * Returns row as associative array 00014 * 00015 * @return array | bool False if no more data is available 00016 */ 00017 public function fetch() { 00018 $ret = false; 00019 if ($this->result && !$this->done) { 00020 $ret = array('c' => $this->result['total_found']); 00021 $this->done = true; 00022 } 00023 return $ret; 00024 } 00025 }