MediaWiki  REL1_19
ResultWrapper Class Reference

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

Inheritance diagram for ResultWrapper:

List of all members.

Public Member Functions

 __construct ($database, $result)
 Create a new result object from a result resource and a Database object.
 current ()
 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.
 key ()
 next ()
 numRows ()
 Get the number of rows in a result object.
 rewind ()
 seek ($row)
 Change the position of the cursor in a result object.
 valid ()

Public Attributes

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

Detailed Description

Result wrapper for grabbing data queried by someone else.

Definition at line 77 of file DatabaseUtility.php.


Constructor & Destructor Documentation

ResultWrapper::__construct ( database,
result 
)

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

Parameters:
DatabaseBase$database
resource$result

Definition at line 86 of file DatabaseUtility.php.

References $result.


Member Function Documentation

Returns:
int

Definition at line 164 of file DatabaseUtility.php.

References next().

Referenced by valid().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Returns:
object
Exceptions:
DBUnexpectedErrorThrown if the database returns an error

Reimplemented in FakeResultWrapper.

Definition at line 113 of file DatabaseUtility.php.

Referenced by IndexPager\extractResultInfo(), and next().

Here is the caller graph for this function:

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

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

Returns:
Array
Exceptions:
DBUnexpectedErrorThrown if the database returns an error

Reimplemented in FakeResultWrapper.

Definition at line 124 of file DatabaseUtility.php.

Referenced by IndexPager\extractResultInfo().

Here is the caller graph for this function:

Free a result object.

Reimplemented in FakeResultWrapper.

Definition at line 131 of file DatabaseUtility.php.

Returns:
int

Definition at line 174 of file DatabaseUtility.php.

Returns:
int

Reimplemented in FakeResultWrapper.

Definition at line 181 of file DatabaseUtility.php.

References fetchObject().

Referenced by current().

Here is the call graph for this function:

Here is the caller graph for this function:

Get the number of rows in a result object.

Returns:
integer

Reimplemented in FakeResultWrapper.

Definition at line 101 of file DatabaseUtility.php.

Referenced by IndexPager\extractResultInfo(), and rewind().

Here is the caller graph for this function:

Reimplemented in FakeResultWrapper.

Definition at line 153 of file DatabaseUtility.php.

References numRows().

Here is the call graph for this function:

ResultWrapper::seek ( row)

Change the position of the cursor in a result object.

See mysql_data_seek()

Parameters:
$rowinteger

Reimplemented in FakeResultWrapper.

Definition at line 143 of file DatabaseUtility.php.

Referenced by IndexPager\extractResultInfo().

Here is the caller graph for this function:

Returns:
bool

Definition at line 190 of file DatabaseUtility.php.

References current().

Here is the call graph for this function:


Member Data Documentation

ResultWrapper::$currentRow = null

Reimplemented in FakeResultWrapper.

Definition at line 78 of file DatabaseUtility.php.

ResultWrapper::$db

Reimplemented in FakeResultWrapper.

Definition at line 78 of file DatabaseUtility.php.

ResultWrapper::$pos = 0

Reimplemented in FakeResultWrapper.

Definition at line 78 of file DatabaseUtility.php.

ResultWrapper::$result

Reimplemented in FakeResultWrapper.

Definition at line 78 of file DatabaseUtility.php.

Referenced by __construct().


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