DBResultSetSphinx Class Reference
[Sphinx]
Result set for Sphinx. More...
Public Member Functions |
|
__construct ($result, $status) | |
close () | |
Closes internal cursor. |
|
fetch () | |
Returns row as associative array. |
|
get_column_count () | |
Returns number of columns in result set.
|
|
get_row_count () | |
Returns number of rows in result set.
|
|
get_status () | |
Returns status. |
|
Protected Member Functions |
|
read_record ($arr_record) | |
Protected Attributes |
|
$result = null | |
$status |
Detailed Description
Result set for Sphinx.
Definition at line 8 of file dbresultset.sphinx.php.
Constructor & Destructor Documentation
DBResultSetSphinx::__construct | ( | $ | result, | |
$ | status | |||
) |
Definition at line 17 of file dbresultset.sphinx.php.
Member Function Documentation
DBResultSetSphinx::close | ( | ) |
Closes internal cursor.
- Returns:
- void
Implements IDBResultSet.
Definition at line 27 of file dbresultset.sphinx.php.
DBResultSetSphinx::fetch | ( | ) |
Returns row as associative array.
- Returns:
- array | bool False if no more data is available
Implements IDBResultSet.
Reimplemented in DBResultSetCountSphinx.
Definition at line 58 of file dbresultset.sphinx.php.
00058 { 00059 $ret = false; 00060 if ($this->result) { 00061 $record = each($this->result['matches']); 00062 if ($record) { 00063 $ret = $this->read_record($record['value']); 00064 } 00065 } 00066 return $ret; 00067 }
DBResultSetSphinx::get_column_count | ( | ) |
Returns number of columns in result set.
- Returns:
- int
Implements IDBResultSet.
Definition at line 36 of file dbresultset.sphinx.php.
DBResultSetSphinx::get_row_count | ( | ) |
Returns number of rows in result set.
- Returns:
- int
Implements IDBResultSet.
Definition at line 45 of file dbresultset.sphinx.php.
DBResultSetSphinx::get_status | ( | ) |
Returns status.
- Parameters:
-
Status
Implements IDBResultSet.
Definition at line 87 of file dbresultset.sphinx.php.
DBResultSetSphinx::read_record | ( | $ | arr_record | ) | [protected] |
Definition at line 69 of file dbresultset.sphinx.php.
00069 { 00070 $ret = array(); 00071 foreach($arr_record as $key => $value) { 00072 if (is_array($value)) { 00073 $ret = array_merge($ret, $this->read_record($value)); 00074 } 00075 else { 00076 $ret[$key] = $value; 00077 } 00078 } 00079 return $ret; 00080 }
Member Data Documentation
DBResultSetSphinx::$result = null
[protected] |
Definition at line 14 of file dbresultset.sphinx.php.
DBResultSetSphinx::$status
[protected] |
Definition at line 15 of file dbresultset.sphinx.php.
The documentation for this class was generated from the following file:
- contributions/sphinx/model/drivers/sphinx/dbresultset.sphinx.php