MediaWiki REL1_28
|
Overloads the relevant methods of the real ResultsWrapper so it doesn't go anywhere near an actual database. More...
Public Member Functions | |
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. | |
next () | |
numRows () | |
Get the number of rows in a result object. | |
rewind () | |
seek ( $row) | |
Change the position of the cursor in a result object. | |
Public Member Functions inherited from ResultWrapper | |
__construct (IDatabase $db=null, $result) | |
Create a row iterator from a result resource and an optional Database object. | |
current () | |
key () | |
valid () | |
Public Attributes | |
function __construct array $result | $rows |
stdClass[] | |
Public Attributes inherited from ResultWrapper | |
resource array null | $result |
Optional underlying result handle for subclass usage. | |
Additional Inherited Members | |
Protected Attributes inherited from ResultWrapper | |
stdClass null | $currentRow = null |
IDatabase null | $db |
int | $pos = 0 |
Overloads the relevant methods of the real ResultsWrapper so it doesn't go anywhere near an actual database.
Definition at line 6 of file FakeResultWrapper.php.
FakeResultWrapper::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. If no more rows are available, false is returned.
DBUnexpectedError | Thrown if the database returns an error |
Reimplemented from ResultWrapper.
Definition at line 41 of file FakeResultWrapper.php.
References ResultWrapper\$currentRow, and fetchRow().
Referenced by next().
FakeResultWrapper::fetchRow | ( | ) |
Fetch the next row from the given result object, in associative array form.
Fields are retrieved with $row['fieldname']. If no more rows are available, false is returned.
DBUnexpectedError | Thrown if the database returns an error |
Reimplemented from ResultWrapper.
Definition at line 20 of file FakeResultWrapper.php.
References ResultWrapper\$currentRow, and ResultWrapper\$pos.
Referenced by fetchObject().
FakeResultWrapper::free | ( | ) |
Free a result object.
This either saves memory in PHP (buffered queries) or on the server (unbuffered queries). In general, queries are not large enough in result sets for this to be worth calling.
Reimplemented from ResultWrapper.
Definition at line 38 of file FakeResultWrapper.php.
FakeResultWrapper::next | ( | ) |
Reimplemented from ResultWrapper.
Definition at line 55 of file FakeResultWrapper.php.
References fetchObject().
FakeResultWrapper::numRows | ( | ) |
Get the number of rows in a result object.
Reimplemented from ResultWrapper.
Definition at line 16 of file FakeResultWrapper.php.
FakeResultWrapper::rewind | ( | ) |
Reimplemented from ResultWrapper.
Definition at line 50 of file FakeResultWrapper.php.
FakeResultWrapper::seek | ( | $row | ) |
Change the position of the cursor in a result object.
See mysql_data_seek()
int | $row |
Reimplemented from ResultWrapper.
Definition at line 34 of file FakeResultWrapper.php.
function __construct array $result FakeResultWrapper::$rows |
stdClass[]
stdClass[] | $rows |
Definition at line 12 of file FakeResultWrapper.php.