MediaWiki  1.27.2
FakeResultWrapper Class Reference

Overloads the relevant methods of the real ResultsWrapper so it doesn't go anywhere near an actual database. More...

Inheritance diagram for FakeResultWrapper:
Collaboration diagram for FakeResultWrapper:

Public Member Functions

 __construct ($array)
 
 fetchObject ()
 Callers want to be able to access fields with $this->fieldName. More...
 
 fetchRow ()
 
 free ()
 
 next ()
 
 numRows ()
 
 rewind ()
 
 seek ($row)
 
- Public Member Functions inherited from ResultWrapper
 __construct ($database, $result)
 Create a new result object from a result resource and a Database object. More...
 
 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 ($row)
 Change the position of the cursor in a result object. More...
 
 valid ()
 

Public Attributes

array $result = []
 
- Public Attributes inherited from ResultWrapper
resource $result
 

Protected Attributes

array stdClass bool $currentRow = null
 
null $db = null
 And it's going to stay that way :D. More...
 
int $pos = 0
 
- Protected Attributes inherited from ResultWrapper
object null $currentRow = null
 
DatabaseBase $db
 
int $pos = 0
 

Detailed Description

Overloads the relevant methods of the real ResultsWrapper so it doesn't go anywhere near an actual database.

Definition at line 211 of file DatabaseUtility.php.

Constructor & Destructor Documentation

FakeResultWrapper::__construct (   $array)
Parameters
array$array

Definition at line 227 of file DatabaseUtility.php.

Member Function Documentation

FakeResultWrapper::fetchObject ( )

Callers want to be able to access fields with $this->fieldName.

Returns
bool|stdClass

Definition at line 266 of file DatabaseUtility.php.

References $currentRow, and fetchRow().

Referenced by next().

FakeResultWrapper::fetchRow ( )
Returns
array|bool

Definition at line 241 of file DatabaseUtility.php.

References $currentRow, and $pos.

Referenced by fetchObject().

FakeResultWrapper::free ( )

Definition at line 259 of file DatabaseUtility.php.

FakeResultWrapper::next ( )
Returns
bool|stdClass

Definition at line 283 of file DatabaseUtility.php.

References fetchObject().

FakeResultWrapper::numRows ( )
Returns
int

Definition at line 234 of file DatabaseUtility.php.

FakeResultWrapper::rewind ( )

Definition at line 275 of file DatabaseUtility.php.

FakeResultWrapper::seek (   $row)

Definition at line 255 of file DatabaseUtility.php.

Member Data Documentation

array stdClass bool FakeResultWrapper::$currentRow = null
protected

Definition at line 222 of file DatabaseUtility.php.

Referenced by fetchObject(), and fetchRow().

null FakeResultWrapper::$db = null
protected

And it's going to stay that way :D.

Definition at line 216 of file DatabaseUtility.php.

int FakeResultWrapper::$pos = 0
protected

Definition at line 219 of file DatabaseUtility.php.

Referenced by fetchRow().

array FakeResultWrapper::$result = []

Definition at line 213 of file DatabaseUtility.php.


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