ResultWrapper Class Reference
[Database]

Result wrapper for grabbing data queried by someone else. More...

Inherited by FakeResultWrapper.

List of all members.

Public Member Functions

 ResultWrapper ($database, $result)
 Create a new result object from a result resource and a Database object.
 numRows ()
 Get the number of rows in a result object.
 fetchObject ()
 Fetch the next row from the given result object, in object form.
 fetchRow ()
 Fetch the next row from the given result object, in associative array form.
 free ()
 Free a result object.
 seek ($row)
 Change the position of the cursor in a result object See mysql_data_seek().
 rewind ()
 current ()
 key ()
 next ()
 valid ()

Public Attributes

 $db
 $result
 $pos = 0
 $currentRow = null


Detailed Description

Result wrapper for grabbing data queried by someone else.

Definition at line 2759 of file Database.php.


Member Function Documentation

ResultWrapper::current (  ) 

Definition at line 2837 of file Database.php.

References next().

Referenced by valid().

ResultWrapper::fetchObject (  ) 

Fetch the next row from the given result object, in object form.

Fields can be retrieved with $row->fieldname, with fields acting like member variables.

Parameters:
$res SQL result object as returned from Database::query(), etc.
Returns:
MySQL row object
Exceptions:
DBUnexpectedError Thrown if the database returns an error

Reimplemented in FakeResultWrapper.

Definition at line 2790 of file Database.php.

Referenced by IndexPager::extractResultInfo(), Block::loadFromResult(), and next().

ResultWrapper::fetchRow (  ) 

Fetch the next row from the given result object, in associative array form.

Fields are retrieved with $row['fieldname'].

Parameters:
$res SQL result object as returned from Database::query(), etc.
Returns:
MySQL row object
Exceptions:
DBUnexpectedError Thrown if the database returns an error

Reimplemented in FakeResultWrapper.

Definition at line 2802 of file Database.php.

Referenced by IndexPager::extractResultInfo().

ResultWrapper::free (  ) 

Free a result object.

Reimplemented in FakeResultWrapper.

Definition at line 2809 of file Database.php.

Referenced by Block::loadFromResult().

ResultWrapper::key (  ) 

Definition at line 2844 of file Database.php.

ResultWrapper::next (  ) 

Definition at line 2848 of file Database.php.

References fetchObject().

Referenced by current().

ResultWrapper::numRows (  ) 

Get the number of rows in a result object.

Reimplemented in FakeResultWrapper.

Definition at line 2777 of file Database.php.

Referenced by IndexPager::extractResultInfo(), Block::loadFromResult(), and rewind().

ResultWrapper::ResultWrapper ( database,
result 
)

Create a new result object from a result resource and a Database object.

Definition at line 2765 of file Database.php.

References $result.

ResultWrapper::rewind (  ) 

Reimplemented in FakeResultWrapper.

Definition at line 2829 of file Database.php.

References numRows().

ResultWrapper::seek ( row  ) 

Change the position of the cursor in a result object See mysql_data_seek().

Reimplemented in FakeResultWrapper.

Definition at line 2819 of file Database.php.

Referenced by IndexPager::extractResultInfo().

ResultWrapper::valid (  ) 

Definition at line 2854 of file Database.php.

References current().


Member Data Documentation

ResultWrapper::$currentRow = null

Reimplemented in FakeResultWrapper.

Definition at line 2760 of file Database.php.

ResultWrapper::$db

Reimplemented in FakeResultWrapper.

Definition at line 2760 of file Database.php.

ResultWrapper::$pos = 0

Reimplemented in FakeResultWrapper.

Definition at line 2760 of file Database.php.

ResultWrapper::$result

Reimplemented in FakeResultWrapper.

Definition at line 2760 of file Database.php.

Referenced by ResultWrapper().


The documentation for this class was generated from the following file:

Generated on Sat Apr 30 22:57:47 2011 for MediaWiki by  doxygen 1.5.9