MediaWiki
1.30.0
|
Overloads the relevant methods of the real ResultsWrapper so it doesn't go anywhere near an actual database. More...
Public Member Functions | |
__construct (array $rows) | |
fetchObject () | |
Fetch the next row from the given result object, in object form. More... | |
fetchRow () | |
Fetch the next row from the given result object, in associative array form. More... | |
free () | |
Free a result object. More... | |
next () | |
numRows () | |
Get the number of rows in a result object. More... | |
rewind () | |
seek ( $row) | |
Change the position of the cursor in a result object. More... | |
Public Member Functions inherited from Wikimedia\Rdbms\ResultWrapper | |
__construct (IDatabase $db=null, $result) | |
Create a row iterator from a result resource and an optional Database object. More... | |
current () | |
key () | |
valid () | |
Additional Inherited Members | |
Public Attributes inherited from Wikimedia\Rdbms\ResultWrapper | |
resource array null | $result |
Optional underlying result handle for subclass usage. More... | |
Protected Attributes inherited from Wikimedia\Rdbms\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 11 of file FakeResultWrapper.php.
Wikimedia\Rdbms\FakeResultWrapper::__construct | ( | array | $rows | ) |
Wikimedia\Rdbms\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 Wikimedia\Rdbms\ResultWrapper.
Definition at line 46 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\ResultWrapper\$currentRow, and Wikimedia\Rdbms\FakeResultWrapper\fetchRow().
Referenced by Wikimedia\Rdbms\FakeResultWrapper\next().
Wikimedia\Rdbms\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 Wikimedia\Rdbms\ResultWrapper.
Definition at line 25 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\ResultWrapper\$currentRow, Wikimedia\Rdbms\ResultWrapper\$pos, and captcha-old\count.
Referenced by Wikimedia\Rdbms\FakeResultWrapper\fetchObject().
Wikimedia\Rdbms\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 Wikimedia\Rdbms\ResultWrapper.
Definition at line 43 of file FakeResultWrapper.php.
Wikimedia\Rdbms\FakeResultWrapper::next | ( | ) |
Reimplemented from Wikimedia\Rdbms\ResultWrapper.
Definition at line 60 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\FakeResultWrapper\fetchObject().
Wikimedia\Rdbms\FakeResultWrapper::numRows | ( | ) |
Get the number of rows in a result object.
Reimplemented from Wikimedia\Rdbms\ResultWrapper.
Definition at line 21 of file FakeResultWrapper.php.
References captcha-old\count.
Wikimedia\Rdbms\FakeResultWrapper::rewind | ( | ) |
Reimplemented from Wikimedia\Rdbms\ResultWrapper.
Definition at line 55 of file FakeResultWrapper.php.
Wikimedia\Rdbms\FakeResultWrapper::seek | ( | $row | ) |
Change the position of the cursor in a result object.
See mysql_data_seek()
int | $row |
Reimplemented from Wikimedia\Rdbms\ResultWrapper.
Definition at line 39 of file FakeResultWrapper.php.