MediaWiki
1.34.0
|
Overloads the relevant methods of the real ResultsWrapper so it doesn't go anywhere near an actual database. More...
Public Member Functions | |
__construct ( $result) | |
current () | |
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... | |
key () | |
next () | |
numRows () | |
Get the number of rows in a result object. More... | |
rewind () | |
seek ( $pos) | |
Change the position of the cursor in a result object. More... | |
valid () | |
Protected Attributes | |
int | $pos = 0 |
stdClass[] array[] | $result |
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 | ( | $result | ) |
stdClass[] | array[] | FakeResultWrapper | $result |
Definition at line 21 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\FakeResultWrapper\$result.
Wikimedia\Rdbms\FakeResultWrapper::current | ( | ) |
Implements Wikimedia\Rdbms\IResultWrapper.
Definition at line 61 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\FakeResultWrapper\$pos, and Wikimedia\Rdbms\FakeResultWrapper\valid().
Referenced by Wikimedia\Rdbms\FakeResultWrapper\fetchObject(), and Wikimedia\Rdbms\FakeResultWrapper\next().
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 |
Implements Wikimedia\Rdbms\IResultWrapper.
Definition at line 33 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\FakeResultWrapper\current(), and 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 |
Implements Wikimedia\Rdbms\IResultWrapper.
Definition at line 41 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\FakeResultWrapper\$pos, Wikimedia\Rdbms\FakeResultWrapper\next(), and Wikimedia\Rdbms\FakeResultWrapper\valid().
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.
Implements Wikimedia\Rdbms\IResultWrapper.
Definition at line 53 of file FakeResultWrapper.php.
Wikimedia\Rdbms\FakeResultWrapper::key | ( | ) |
Implements Wikimedia\Rdbms\IResultWrapper.
Definition at line 67 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\FakeResultWrapper\$pos.
Wikimedia\Rdbms\FakeResultWrapper::next | ( | ) |
Implements Wikimedia\Rdbms\IResultWrapper.
Definition at line 71 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\FakeResultWrapper\current().
Referenced by Wikimedia\Rdbms\FakeResultWrapper\fetchObject(), and Wikimedia\Rdbms\FakeResultWrapper\fetchRow().
Wikimedia\Rdbms\FakeResultWrapper::numRows | ( | ) |
Get the number of rows in a result object.
Implements Wikimedia\Rdbms\IResultWrapper.
Definition at line 29 of file FakeResultWrapper.php.
Wikimedia\Rdbms\FakeResultWrapper::rewind | ( | ) |
Definition at line 57 of file FakeResultWrapper.php.
Wikimedia\Rdbms\FakeResultWrapper::seek | ( | $pos | ) |
Change the position of the cursor in a result object.
See mysql_data_seek()
int | $pos |
Implements Wikimedia\Rdbms\IResultWrapper.
Definition at line 49 of file FakeResultWrapper.php.
References Wikimedia\Rdbms\FakeResultWrapper\$pos.
Wikimedia\Rdbms\FakeResultWrapper::valid | ( | ) |
Definition at line 77 of file FakeResultWrapper.php.
Referenced by Wikimedia\Rdbms\FakeResultWrapper\current(), and Wikimedia\Rdbms\FakeResultWrapper\fetchRow().
|
protected |
Definition at line 16 of file FakeResultWrapper.php.
Referenced by Wikimedia\Rdbms\FakeResultWrapper\current(), Wikimedia\Rdbms\FakeResultWrapper\fetchRow(), Wikimedia\Rdbms\FakeResultWrapper\key(), and Wikimedia\Rdbms\FakeResultWrapper\seek().
|
protected |
Definition at line 13 of file FakeResultWrapper.php.
Referenced by Wikimedia\Rdbms\FakeResultWrapper\__construct().