MediaWiki  1.23.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 ()
 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 ()
 
 rewind ()
 
 seek ( $row)
 Change the position of the cursor in a result object. More...
 
- Public Member Functions inherited from ResultWrapper
 __construct ( $database, $result)
 Create a new result object from a result resource and a Database object. More...
 
 current ()
 
 key ()
 
 valid ()
 

Public Attributes

array $result = array()
 
- 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
 $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 230 of file DatabaseUtility.php.

Constructor & Destructor Documentation

◆ __construct()

FakeResultWrapper::__construct (   $array)

Definition at line 239 of file DatabaseUtility.php.

Member Function Documentation

◆ fetchObject()

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.

Returns
object
Exceptions
DBUnexpectedErrorThrown if the database returns an error

Reimplemented from ResultWrapper.

Definition at line 272 of file DatabaseUtility.php.

References $currentRow, and fetchRow().

Referenced by next().

◆ fetchRow()

FakeResultWrapper::fetchRow ( )

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 from ResultWrapper.

Definition at line 250 of file DatabaseUtility.php.

References $currentRow, and $pos.

Referenced by fetchObject().

◆ free()

FakeResultWrapper::free ( )

Free a result object.

Reimplemented from ResultWrapper.

Definition at line 268 of file DatabaseUtility.php.

◆ next()

FakeResultWrapper::next ( )
Returns
int

Reimplemented from ResultWrapper.

Definition at line 286 of file DatabaseUtility.php.

References fetchObject().

◆ numRows()

FakeResultWrapper::numRows ( )
Returns
int

Reimplemented from ResultWrapper.

Definition at line 246 of file DatabaseUtility.php.

◆ rewind()

FakeResultWrapper::rewind ( )

Reimplemented from ResultWrapper.

Definition at line 281 of file DatabaseUtility.php.

◆ seek()

FakeResultWrapper::seek (   $row)

Change the position of the cursor in a result object.

See mysql_data_seek()

Parameters
int$row

Reimplemented from ResultWrapper.

Definition at line 264 of file DatabaseUtility.php.

Member Data Documentation

◆ $currentRow

array stdClass bool FakeResultWrapper::$currentRow = null
protected

Definition at line 237 of file DatabaseUtility.php.

Referenced by fetchObject(), and fetchRow().

◆ $db

null FakeResultWrapper::$db = null
protected

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

Definition at line 233 of file DatabaseUtility.php.

◆ $pos

int FakeResultWrapper::$pos = 0
protected

Definition at line 235 of file DatabaseUtility.php.

Referenced by fetchRow().

◆ $result

array FakeResultWrapper::$result = array()

Definition at line 231 of file DatabaseUtility.php.


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